【问题标题】:How I can skip step of jQuery Smart Wizard?如何跳过 jQuery 智能向导的步骤?
【发布时间】:2016-10-29 00:06:11
【问题描述】:

我尝试跳过步骤,但它不起作用。我使用此代码:

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

在这段代码中

} 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;

但我得到了圈子:

但如果我删除$('#wizard').smartWizard('goToStep', 3);,它就可以正常工作。

我的错误是什么?

【问题讨论】:

    标签: javascript smart-wizard


    【解决方案1】:

    你必须停止循环的执行。

    代码将是,

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-09
      • 1970-01-01
      • 2018-03-28
      相关资源
      最近更新 更多