2

I tried to skip step, but it doesn't work. I use this code:

$('#wizard').smartWizard('goToStep', 3);

in this code

} else if (stepnumber == 2){
    if (validate_step('#step-2-form')) {
       var form_data = $('#step-2-form').serializeArray(),
           value = form_data[0].value;

       // If owner have access to email, skip 3
       if (value == 'yes') {
           console.log('Skip 3');
           $('#wizard').smartWizard('goToStep', 3);
       }

       } else { isStepValid = false; }
           return isStepValid;

But I got circle:

enter image description here

But if I remove $('#wizard').smartWizard('goToStep', 3);, it's works fine.

What is my mistake?

JRazor
  • 2,707
  • 18
  • 27

1 Answers1

0

you have to stop execution of the loop.

code will be,

$('#wizard').smartWizard('goToStep', 3); 

return false;