replaced quote.coffee with quote.js
This commit is contained in:
parent
b7cb6f2591
commit
092c54ab0c
2 changed files with 7 additions and 4 deletions
|
@ -1,4 +0,0 @@
|
||||||
$ ->
|
|
||||||
$.getJSON './quotes.json', (data) ->
|
|
||||||
quote = data[Math.floor(Math.random()*data.length)]
|
|
||||||
$('#quote').append("<h3>#{quote.title}</h3><p>#{quote.description}</p>")
|
|
7
content/assets/scripts/quote.js
Normal file
7
content/assets/scripts/quote.js
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
$(function() {
|
||||||
|
return $.getJSON('./quotes.json', function(data) {
|
||||||
|
var quote;
|
||||||
|
quote = data[Math.floor(Math.random() * data.length)];
|
||||||
|
return $('#quote').append("<h3>" + quote.title + "</h3><p>" + quote.description + "</p>");
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in a new issue