Jquery步骤->按钮单击->转到步骤

Jak*_*ota 2 jquery wizard jquery-steps

我正在asp.net 应用程序中使用jquery 步骤向导。单击按钮时更改步骤的事件出现问题。file.js 中的初始化步骤

var WizardFunc = function () {
    var wizard = null;
    return {
        WizardSet: function () {
            wizard = $('#order').steps({
                bodyTag: "fieldset",
                transitionEffect: "slideLeft",
                headerTag: "h1",
                autoFocus: true
            });
        },
        WizardStepAdd: function (index, title, contentId) {
            wizard.steps("insert", index, {
                title: title,
                content: "<div id='" + contentId + "'></div>"
            });
        },
        WizardGoToStep: function (index) {
            wizard.steps("setStep", 1);
        },
        WizardStepRemove: function (index) {
            wizard.remove(index);
        }
    }
}();
Run Code Online (Sandbox Code Playgroud)

我尝试调用函数:

$("#new-size-container").on("click", ".add-size", function () { 
WizardFunc.WizardGoToStep(1);}
Run Code Online (Sandbox Code Playgroud)

返回错误:

Not yet implemented!
Run Code Online (Sandbox Code Playgroud)

问:单击按钮时如何调用函数更改步骤索引?

pti*_*jul 5

对于任何访问此旧的未解决帖子的人,请注意,该插件能够动态导航到步骤(下一个或上一个),如下所述: http: //www.rafaelstaib.com/category/jQuery-Steps

 $(this).steps("previous");
Run Code Online (Sandbox Code Playgroud)

或者

 $(this).steps("next");
Run Code Online (Sandbox Code Playgroud)

  • 干杯,我通过在循环中调用“previous”解决了同样的问题,具体取决于我所在的索引以及我想要导航到的索引。 (2认同)