Could you tell me why this code doesn’t work for me?
$document().ready(function(){
console.log( "document loaded" );
var quote, author;
function getNewQuote(){
$.ajax({
url: "http://api.forismatic.com/api/1.0/",
jsonp: "jsonp",
dataType: "jsonp",
//data: "method=getQuote&format=jsonp&lang=en&jsonp=?"
data: {
method: "getQuote",
lang: "en",
format: "jsonp"
},
success: function(res){
//console.log(res);
quote = res.quoteText;
author = res.quoteAuthor;
$('#quote').text(quote);
}
});
}
getNewQuote();
});