Wikipedia viewer help!

Wikipedia viewer help!
0

#1

Hi

I’ve looked at a number of threads and examples for the wikipedia viewer exercise and can’t get mine to work properly. I think the url I have is good, but it doesn’t seem like the getJSON is receiving anything. Here’s my Codepen: https://codepen.io/sun-dance/pen/MpbXjw

The layout is a work in progress, just trying to get the JS in order first…

Thank you in advance!


#2

Since you are making this a form you need to prevent the page from reloading when the form is submitted. Accept an event argument into your onclick function and disable default behavior:

$(".searchButton").click(function(evt){
    evt.preventDefault();
    ...

#3

@RadDog25, thank you very much. I hadn’t thought to look at that part of my page. I appreciate the insight.