jQuery-Smart-Wizard
jQuery-Smart-Wizard copied to clipboard
goToStep is not working
$('#wizard').smartWizard("goToStep", 5)
I am running this code on document on load function
but its not going to step 5. Please need help
Thank you
Hi in latest version the public method was removed, add this : goToStep: function (stepNum) { this._showStep(stepNum); }, in SmartWizard/dist/js/jquery.smartWizard.js
@cmanuelf87 goToStep: function (stepNum) { this._showStep(stepNum); }, is not working.
Hi @RajeshMalviya14 if you want you can put the file where you placed the function to review what may be missing
Hi,
Thanks for this great work.
Why did you delete the public methods and leave it in the doc ?
To make it works, add the previous method on line 86 in SmartWizard/dist/js/jquery.smartWizard.js, before "init" : `$.extend(SmartWizard.prototype, {
goToStep: function (stepNum) {
this._showStep(stepNum);
},
init: function () {
// Set the elements
this._setElements();
// Add toolbar
this._setToolbar();
// Assign plugin events
this._setEvents();`
$('#smartwizard').smartWizard('goToStep', nextStep);
@AdrienV i think the reason behind removing it would be that it does not respect the options if selected not to navigate away from the step using enableAllSteps:false it would still allow the user to move to the next steps by just calling the method in console, maybe maybe not. just a wild guess.