Hey guys! I can’t seem to call getJSON correctly…any help is appreciated!
I am trying to work with this API:
relevant bit of javaScript:
var apiReq = "https://api.forismatic.com/api/1.0/?method=getQuote&key=457653&format=JSON&lang=en";
$.getJSON(apiReq, function(json) {
$("#test").html(json);
});
I am pretty sure the API is returning correctly because when I copy/paste the URL into a browser, it returns data as expected.
here is a link to my codepen:
I am expecting the
aaaa
to change to the raw json output(you can see I moved it outside the click function for testing)
[bonus q]: trying to get the radios to line up right next to the new quote button (right now the radios seem to be center justified)…any thoughts??
Thanks!!
–t