Hello Everybody!! I manage to finish the Random Quote Machine as you can see in this Codepen [I know the styles are still ugly and the quote just appears after the first click, I’m working on it ATM].
In order to make it work I had to set datatype on ajax as ‘jsonp’ otherwise I won’t be able to retrieve th json file from the API but this is really confusing, so my questions are:
- is this happening beacause I’m working on my localhost and not on a real Live server?
- If AJAX request are limited to connections between the same domain, then what’s the right way to do it when you are working on a live server? using json or jsonp?
Thanks in advance for your help!
PS: I know maybe some of this questions or the way I define concepts may sound ridiculous to you… as I say, I’m really lost trying to undertand this so sorry!
PS2: If there some documentation, articles or guides you think I should read to get the grasp of all this subjects, please share with me.