My Wikipedia Viewer! Would love feedback!

I would love some feedback on my Wikipedia viewer! Let me know if you find any bugs! Thanks for your help!

Nice theme and smooth animations. But when I tried to search for the second time, the search box was pushed out of the page. I haven’t checked your code but seems like you didn’t remove the previous searched results before showing the new one.

Thank you for pointing that out. I hadn’t noticed that! I looked back and I think it is because I change the top margin after the json request for the initial animation so it pushes it out of the page on the second one.

  $.getJSON(apiURL, function(json) {
        $("#searchBar").animate({'margin-top' : "-=18%"});
        $("#results").show(100);

I’m not quite sure how to fix that so it only happens the first time. I’ll have to do some research! Thank you for your feedback!

Hi! I like your wikipedia viewer; simple but elegant. To fix the margin-top issue you could put your searchBar animate into an if statement, such as if($("#searchBar").css("margin-top", "20%)){$("#searchBar").animate({'margin-top' : "-=18%"});}.

Thank you so much! That worked! And an easier fix than I was expecting. I appreciate the help!