smartwizard 4 中的所有步骤均处于活动状态

All steps active in smartwizard 4

我在我的应用程序的表单中包含了 smartwizard,它在插入期间工作得很好。 但是,在更新期间,我想显示所有访问过的步骤,这样用户就可以直接进入 s/he 想要的选项卡,而不是单击下一步按钮。 我怎样才能做到这一点? 我知道我可能必须对主 js 文件中的 _setEvents 函数进行更改,即 jquery.smartWizard.min.js,但我似乎无法弄清楚..

在anchorSettings中找到了答案。 您添加 anchorSettings 参数并按如下方式更改值,

anchorClickable         :   true, // Enable/Disable anchor navigation
        enableAllAnchors        :   true, // Activates all anchors clickable all times
        markDoneStep            :   true, // add done css
        enableAnchorOnDoneStep  :   true // Enable/Disable the done steps navigation

尝试将 enableAllSteps 设置为 true:

$('#wizard').smartWizard({enableAllSteps: true});
    $('#smartwizard').smartWizard({
        selected: 0,
        theme: 'default',
        transitionEffect: 'fade',
        showStepURLhash: false,
        anchorSettings: {
            anchorClickable: true, // Enable/Disable anchor navigation
            enableAllAnchors: true, // Activates all anchors clickable all times
            markDoneStep: true, // add done css
            enableAnchorOnDoneStep: true // Enable/Disable the done steps navigation
        },
        lang: { next: 'Next', previous: 'Previous' }
    });