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

onPrevious is not providing correct index value #104

Open jpatel3 opened 10 years ago

jpatel3 commented 10 years ago

For some reason onPrevious is not giving right index value

onPrevious: function( tab, navigation, index ){ }

If I have 4 items in the wizard and from the last item if I click on previous it doesn't give right value.

VinceG commented 10 years ago

@jpatel3 what value does it give? and what value are you expecting?

jpatel3 commented 10 years ago

@VinceG Similar behavior as onNext, index variable should have the value of the current tab, however I think in onPrevious it gives one value less. In order to get the current tab index, you have to do index+1