My magical random quote machine! Would love your feedback

My magical random quote machine! Would love your feedback
0

#1

A week ago I didn’t even know what an API was, not to mention JSON or AJAX, but I decided to stick through it and use it for this challenge. It was challenging indeed but very educational and after a lot of troubleshooting (annoying CORS stuff) I managed to make it work! and I’m proud.

Here is the full version

I would love to hear what you think! :slight_smile:


#2

Sweet styling! I used JSONP to get around the cors issue. Still trying to wrap my head around it all myself.

$.ajax({
    url:"https://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&_jsonp=mycallback",
    dataType:"jsonp"
  });

#3

Thanks! That’s a good idea, I’ll probably use it in one of the other projects to try out different things.