5

This is a specific question to twitter bootstrap http://vadimg.com/twitter-bootstrap-wizard/

I am trying to work out if anyone has been able to skip steps when handling the onNext event. I want to skip steps depending on inputs that have been selected on previous steps. I have seen you can do this:

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

I can't use this as I have disabled the tabs, and this unfortunately doesn't help if I use this during the onNext event if I have enabled the tabs as it continues to executes the code from the onNext event caller.

Thanks Dan

davidkonrad
  • 83,997
  • 17
  • 205
  • 265
Danjuro
  • 205
  • 3
  • 14
  • 2
    There is an $el.bootstrapWizard('show', tab) method which I use. This is an old question though, maybe you've got it handled already. – ryanday Apr 16 '14 at 15:26

1 Answers1

2

simply you can use

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

and _myWizard is what returned from bootstrapWizard initialisation

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

hope this helps you

Basheer AL-MOMANI
  • 14,473
  • 9
  • 96
  • 92