Try this working JSfiddle example , which I made based on the solution suggested by @medievo in this post .
Apparently, the problem is that somehow the onStepChange event onStepChange for the main-wizard no longer called as soon as the sub-wizard initialized and displayed. I can provide additional information after debugging the library. Will keep you posted.
About the solution:
Let's say that we have two functions that initialize main-wizard and sub-wizard using the jquery.steps library.
The function for the main-wizard as follows:
var shoMainWizard = function(){ $("#main-wizard").steps({ onStepChanging: function (event, currStepIndex, nextStepIndex) {
Note that the onStepChanging handler forces the sub-wizard initialized and displayed in the first call and simply displayed in the next calls.
Note that the onStepChanged handler switches the view by placing the previous-step view and displaying the next-step view .
The function for the sub-wizard as follows:
var shoSubWizard = function(currStepIndex, nextStepIndex){ // if sub-wizard note rendered yet if (!$('#sub-wizard').hasClass('wizard')){ /* All your jquery.steps config stuff here plus the following event handlers */ onFinished: function() { $("#main-wizard").steps("next"); } }); } // otherwise, display sub-wizard with last changes else { $("#main-wizard-p-" + currStepIndex).hide(); $("#main-wizard-p-" + nextStepIndex).fadeIn(); } }
Note that there is an if to determine if the sub-wizard has already been initialized or not, asking if there is already a wizard class that adds jquery.steps . If it has already been initialized, we just need to show() it.
Note that the onFinished handler makes main-wizard continuation of next-step .
Hope this helps solve your problem.
EDIT:
After viewing and debugging the code, the problem is that the next jQuery query (line # 1196 from the library) gets all steps content from the main-wizard and sub-wizard and makes the transition (from the step that contains the submaster to the next step) so that they mixed up.
var stepContents = wizard.find(".content > .body")
Changing this line as follows fixes the problem. However, there are other lines that need a similar fix.
var stepContents = wizard.find("> .content > .body")
Note also that there is a pull request that is awaiting confirmation, which seems to fix the problem. However, IMHO, this extraction request directly changes the embedded file from the library, and it probably wonβt get approval.
EDIT 2:
The Pull request was created here to fix the problem with nested jquery.steps wizards.