Going to a custom step with jQuery-steps

前端 未结 15 1138
粉色の甜心
粉色の甜心 2020-12-28 16:46

I am using a jQuery-steps on my app to for a wizard-like situation. I am having trouble finding out how to change to a custom step though. Any help with this one?

         


        
15条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-28 16:53

    Adding to the answer above by @FernandoTholl, for clarification, wizard.steps("setStep", 1); goes in onStepChanged

    $('#wizard').steps({
      onStepChanging: function (event, currentIndex, newIndex) {
          //blah, blah, blah, some code here
      },
      onStepChanged: function (event, currentIndex, newIndex) {
        $('#wizard').steps("setStep", 3);
      },
      onFinished: function () {
          ///more code
      }
    });
    

提交回复
热议问题