Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sub steps to return previous step #12

Open
imsarah opened this issue Jan 2, 2018 · 1 comment
Open

Sub steps to return previous step #12

imsarah opened this issue Jan 2, 2018 · 1 comment

Comments

@imsarah
Copy link

imsarah commented Jan 2, 2018

Hi, I am currently working on this jquery wizard with four steps. In Step 2, I made two buttons "yes" and "no" where "no" hides the div (pg2) and show another div (pg2a). Pg2a shows a retry button and returns back to step 1.

div structure

#wizard
#wizard-pane
div.pg1
#wizard-pane
div.pg2
div.pg2a
#wizard-pane
div.pg3

...etc

Clicking a No button in pg2 will show pg2a, hide pg2.
Retry button on pg2a should return to pg1.

Jquery:

 $( ".retry-btn" ).click(function() {
    $( ".pg2" ).show();
    $( ".pg2a" ).hide();
  });

    jQuery(function($) {
      $('.wizard').wizard();
    });

$( ".retry-btn").click(function() {
      $('.wizard').wizard('first');
    });

However going back to step1, the tabdoes not change to active color

@Andrewsopoku
Copy link

Try
$('.wizard').wizard('reset');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants