Abdul M. Diaz Abdul M. Diaz - 1 year ago 73
jQuery Question

Button onclick won't work

On my site, when I click the "Begin the Exam" button, some elements are supposed to be shown. However, whenever I click it, the elements are shown and then hidden. This is the site and this is the code that controls the

event :

// Display initial question


Answer Source

You can solve this as follows;


  $("#quiz, #prev, #next, #questionnum").removeClass("hidden");


Or, just you can modify your "Begin the exam" button for solving this. If you update href attribute like this; href="javascript:;", you can solve this. Because, when your has empty href attribute, page will be refreshed. You need to prevent this default action or you need to set an useless href attribute to your link.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download