I'm trying to get random quotes from this API - http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&_jsonp=mycallback.
API documentation at https://quotesondesign.com/api-v4-0/
Error message from the console: Uncaught ReferenceError: mycallback is not defined. How do I get around the problem? My code below. Any help appreciated, thanks!
$(document).ready(function(){
function getNewQuote(){
$.ajax({
method: 'GET',
url: 'http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&_jsonp=mycallback',
jsonp: 'jsonp',
dataType: 'jsonp'
}).done(function(data){
console.log(data);
});
}
getNewQuote();
});