VinceG / twitter-bootstrap-wizard

This twitter bootstrap plugin builds a wizard out of a formatter tabbable structure. It allows to build a wizard functionality using buttons to go through the different wizard steps and using events allows to hook into each step individually.
MIT License
1.39k stars 676 forks source link

Skip a tab #139

Closed CarolineBoyer closed 9 years ago

CarolineBoyer commented 9 years ago

Hi,

Just discover your wizard, it's awesome.

One question though: How can i use the documentation you've given us to skip a tab ?

I get the user input thanks to a javascript var. If he choose a said entry, the wizard doesn't go to the next step but the one after that.

I tried something like

'onNext' : function(tab,navigation, index) { var current = index+1; if(current == 3) { if (post['choice'] != "choice_1") { $(this).show(tab,navigation,current+2); } } }, 'onPrevious' : function(tab,navigation, index) { var current = index+1; if(current == 5) { if (post['choice'] != "choice_1") { $(this).show(tab,navigation,current-2); } } }

But of course, show is just a fake name. Do you have such a function ?

VinceG commented 9 years ago

@Aeoline https://github.com/VinceG/twitter-bootstrap-wizard/issues/19