This is a problem on Free Code Camp that I'm trying to solve but no one can help me on the help box there, it seems. The problem is something that should be very straightforward but I just cannot see what the problem is.
I'm doing the Random Quote Generator challenge and decided to create my own .json file on my own web space to get the quotes from. Such test files can be found here:
http://www.deanius.co.uk/json/cats.json
http://www.deanius.co.uk/json/RandomQuoteGenerator.json
http://www.deanius.co.uk/json/RandomQuoteGenerator_original.json
I thought the easy way to test whether or not this data (which is parsed correctly) can be obtained would be to change the path in the Free Code Camp lesson called "Get JSON with the jQuery getJSON Method", which can be found at https://www.freecodecamp.com/challenges/get-json-with-the-jquery-getjson-method ... thinking the simple solution is add the code on the left where it says ("Only change code below this line") and change the /json/cats.json
to one of the paths above.
But... even when I change the path to just the http://www.deanius.co.uk/json/cats.json
one (which is the exact same data as /json/cats.json
) it does nothing. I thought this could be a limitation of FCC's testing abilities so took the JS and HTML from the lesson and stuck them in their respective boxes in Codepen, with the jQuery.min.js external script added. It still does nothing.
There's got to be a very simple answer to this. Does anybody know what it is?
Thanks