Going to a custom step with jQuery-steps

前端 未结 15 1176
粉色の甜心
粉色の甜心 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 17:16

    function GotoSpecificStep(action, currentStep, number) {
        try
        {
            var stepsTogo = parseInt(currentStep) - parseInt(number);
            for (i = 1; i <= Math.abs(parseInt(stepsTogo)) ; i++) {
                if (action == "next") {
                    $(".btnNext").click();
                }
                else if (action == "prev") {
                    $(".btnPrevious").click();
                }
            }
        }
        catch(exception)
        {
            MsgBox(exception.message);
        }
    }
    

提交回复
热议问题