My page contains some small wizard which I built using jQuery.
I would like to offer the user to restart/reset the wizard and start it from the beginning level.
There is anyway to do it without refreshing the page?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
One way to achieve this would be to clone() the wizard’s element tree in its initial state and store it in a global variable or in the document’s data:
(Note that passing
truetoclone()also clones element data and event handlers, which might prove handy in your case.)Then, when you want to restore the wizard to its original state, you can do: