Need help with forismatic API

I found this challenge a hard one and had to look for additional info online, still having trouble with the whole deal and any help or guidance would be appreciated.

I can’t seem to understand what I’m missing in my code;

My RQM on Codepen

You’ll have to remove the https:// from your pen’s url (view the pen on http)

or use in your API url

try this url- when the format is JSONP you have to use a callback=?

  2. when testing a JSON to see if the url content is correct you can test it in a 'JSON beautifier'  -

Hey that worked, thanks…BTW any idea why when the author field is empty it does not display “Unknown” although its in an if statement in the script section??

yeah the cross origin worked… I was checking everything… the interesting thing is for mine I did not need the crossorigin


I think you swapped these lines:

        if(data.quoteAuthor !== "") {
          $('#content').html(data.quoteText); // this line
        } else {

        $('#author').html(data.quoteAuthor); // and this line

Also if you remove lines 3 and 4: you come is mush smoother when loading…

$("#getQuote").html("Loading..."); $("#getQuote").attr("disabled", true);