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 return on current tab on form submit. #183

Open sachin0606 opened 8 years ago

sachin0606 commented 8 years ago

Hi all, may i know how to set the current tab on form submit?

pa-ra-kram commented 8 years ago

After the submit event, you can navigate to any tab by calling the show function. $('#wizard').bootstrapWizard('show', 3); 3 is the index of the tab which you want to show. 0 for the first tab.

DiegoWtf commented 8 years ago

$('#wizard').bootstrapWizard('show', 3); is it really works? in my case this didn't work(

And i try this variants (which didn't work too) $('#rootwizard').bootstrapWizard('show', 2); $('#rootwizard').find("a[href*='tab3']").trigger('click'); $('#rootwizard').find("a[href*='tab3']").click();

sachin0606 commented 8 years ago

HI DiegoWtf 👍 i used below method in Asp.net

var myHidden = document.getElementById('<%= TabName.ClientID %>').value; $('#rootwizard').bootstrapWizard('display', $(myHidden).val());

where tabname is the hiddenfield. and its working now.