zeus.ugent.be/content/assets/scripts/quote.coffee
2016-10-03 22:54:54 +02:00

4 lines
177 B
CoffeeScript

$ ->
$.getJSON './quotes.json', (data) ->
quote = data[Math.floor(Math.random()*data.length)]
$('#quote').append("<h3>#{quote.title}</h3><p>#{quote.description}</p>")