Help with Wikipedia Viewer

Hi i am currently stuck on my wikipedia viewer as for some reason i am unable to enter my $.getJSON call i think the problem is something in the url i am calling but i cant see anything as i have even added the callback=? at the back so as to trigger JSONP. Any help would be appreciated! The link to the pen is http://codepen.io/sidharthsikka/pen/rLRVBY. Thank you!

Try adding return false; after $.getJSON

...
...
 $.getJSON(url, function(json) {
   alert("inside");
   console.log(json);
  });
  return false;  // <-- Add this
});
1 Like

Thank you that worked! could you explain why by adding that it worked?

Read this (third answer explains return false, but you should read all of them):

1 Like