javascript - 如何启用 Bootstrap 向导最后一个按钮

标签 javascript html twitter-bootstrap wizard

我用过这个插件: http://vinceg.github.io/twitter-bootstrap-wizard/

最后,下一个按钮被禁用,任何人都可以帮助我如何启用它。?

最佳答案

为此,您必须使用以下功能:

$('#rootwizard .finish').click(function() {
    $('#rootwizard').find("a[href*='tab1']").trigger('click'); // if you want to go to first tab again. Else do what ever you want to do like enable next button again. 
});

你必须在最后一个按钮上完成类(class)。

Or

如果您只想在下一个按钮上执行此操作,可以执行以下操作:

$('#rootwizard').bootstrapWizard({onTabShow: function(tab, navigation, index) {
    var $total = navigation.find('li').length;
    var $current = index+1;

    if($total == $current){do what you want on last next button.} }});

关于javascript - 如何启用 Bootstrap 向导最后一个按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46116045/

相关文章:

html - 如何设置不同的h4和a :hover on certain pages

javascript - 如何延迟 for 循环并运行 Canvas 操作?

javascript - 一致地显示各种未知维度的图像

php - 如何使用 jquery 调用 cakephp 操作?

javascript - 如何在 Angular2 中的 Jasmine 中编写用于重定向 URL 的测试用例?

html - CSS:在小屏幕上全宽的 div 不起作用

JQuery Keydown、Keypress、Keycode 等

html - 单击以突出显示(更改图像)时图像按钮闪烁

html - 如何单独且排他地更改 btn-group 颜色?

angularjs - 使用 angular-ui-router 和 bootstrap $modal 创建一个多步骤向导