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

How to use the 'hide' method #225

Closed sgustafsson closed 6 years ago

sgustafsson commented 6 years ago

I am trying to dynamically hide a single step from my 5 step wizard. By hiding, I mean I want the li and the corresponding tab/div to be hidden. Per documentation, the hide method only hides the li, but not the div of the tab. and that is also what I experience, the corresponding navbar entry is hidden, but by navigation via "Next" through my wizard, the final tab now shows the corresponding tab/div of what was once my hidden step's tab/div.

Example

li1 li2 li3 li4 li5 tab1 tab2 tab3 tab4 tab5

.bootstrapWizard('hide', 3);

li1 li2 li3 li5 tab1 tab2 tab3 tab4

How can I achieve

li1 li2 li3 li5 tab1 tab2 tab3 tab5

I did try calling the resetWizard after hiding my step, but it didn't have any effect

thanks in advacne and cheers

sgustafsson commented 6 years ago

I switched from version 1.2 from cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap-wizard/1.2/jquery.bootstrap.wizard.min.js to the latest js code in versio n1.4.2 in this repo, now it works as expected ;-)