Can anyone tell me why can’t get the quotes from formismatic.com api
const url = "https://api.forismatic.com/api/1.0/?method=getQuote&format=json&lang=en";
$.ajax({url: url, dataType:"application/json", async: true, success: function(result){
("#next_quote").click(function(){
$("#text").append(result.quoteText);
$("#author").append(result.quoteAuthor);
})
}});
Developer tools console can most of the time tell you what went wrong.
Currently you have a CORS error, which means that this resource is only accessible from formismatic.com (and any other domain that they specifically allow).
Further reading: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
Depending on their API setup, there might not be any workarounds.
Thanks for the help. I will see to it.