Help with Wikipedia Viewer

Help with Wikipedia Viewer
0

#1

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!


#2

Try adding return false; after $.getJSON

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

#3

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


#4

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