In my Random Quote Machine ( http://codepen.io/raulfm/pen/qroXEG ), when I click at the button, it shows a quote from a WordPress API ( http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&callback= ). But it show always the same quote! Why? It must show always a random quote, but it doesn’t work (because it always shows the same quote).
See how is the code below:
$(".new-quote").click(function(){
$.getJSON("http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&callback=", function(json) {
$("h3").html(json[0].content);
$(".author").html(json[0].title);
});
}