Going to a custom step with jQuery-steps

前端 未结 15 1143
粉色の甜心
粉色の甜心 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:09

    I did this so I created this new function:

    function _goToStep(wizard, options, state, index)
    {
        return paginationClick(wizard, options, state, index);
    }
    

    And the call that is not implemented, put this:

    $.fn.steps.setStep = function (step)
    {
    
        var options = getOptions(this),
            state = getState(this);
    
        return _goToStep(this, options, state, step);
    
    };
    

    Just taking advantage of what already existed plugin.

    Use:

    wizard.steps("setStep", 1);
    

提交回复
热议问题