【问题标题】:Twitter bootstrap wizard skip steps during onnextTwitter 引导向导在 onnext 期间跳过步骤
【发布时间】:2013-01-21 07:49:05
【问题描述】:

这是 twitter bootstrap http://vadimg.com/twitter-bootstrap-wizard/ 的具体问题

我正在尝试确定是否有人能够在处理 onNext 事件时跳过步骤。我想根据先前步骤中选择的输入跳过步骤。我看到你可以这样做:

$('#rootwizard .finish').click(function() {
    alert('Finished!, Starting over!');
    $('#rootwizard').find("a[href*='tab1']").trigger('click');
});

我不能使用它,因为我已经禁用了选项卡,如果我在 onNext 事件期间使用它,如果我启用了选项卡,因为它继续执行来自 onNext 事件调用者的代码,这将无济于事。

谢谢 丹

【问题讨论】:

  • 我使用了一个 $el.bootstrapWizard('show', tab) 方法。这是一个老问题,也许你已经解决了。

标签: twitter-bootstrap twitter-bootstrap-wizard


【解决方案1】:

你可以使用

_myWizard.bootstrapWizard('show', 6);// zero-bazed index

而_myWizard 是从bootstrapWizard initialisation 返回的内容

var _myWizard=$('#AddMemberWizard').bootstrapWizard({
    'tabClass': 'form-wizard',
    'onNext': function (tab, navigation, index) {
            .....
         }
});

希望对你有帮助

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-11-06
    • 1970-01-01
    • 2017-07-20
    • 1970-01-01
    相关资源
    最近更新 更多