zeus.ugent.be/content/assets/scripts/quote.js

8 lines
247 B
JavaScript
Raw Normal View History

2018-12-19 22:22:49 +01:00
$(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>");
});
});