Wikipedia Viewer - Issue w/ jQuery click event firing only once

Wikipedia Viewer - Issue w/ jQuery click event firing only once
0.0 0

#1

I’m having trouble getting the behavior I would like for my Wikipedia viewer. You can enter text into the text field, click the search button, and the results display on the page, but this works only once. My desired behavior page is for the user to be able to delete their first search, press search again, and new results to display. I think my issue has to do with the jQuery click event and binding. Could you all help me solve this issue?

Also, feedback on styling and other aspects of the viewer is welcome.


#2

You actually get search results for next keywords, but you forgot to clear the earlier ones.


#3

@kevcomedia Thanks. That was it. Using empty() to clear my previous results HTML fixed the problem.