Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

goToStep is not working #116

Open
harisr92 opened this issue Feb 13, 2018 · 5 comments
Open

goToStep is not working #116

harisr92 opened this issue Feb 13, 2018 · 5 comments

Comments

@harisr92
Copy link

harisr92 commented Feb 13, 2018

$('#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

@cmanuelf87
Copy link

Hi in latest version the public method was removed,
add this :
goToStep: function (stepNum) {
this._showStep(stepNum);
},
in SmartWizard/dist/js/jquery.smartWizard.js

@RajeshMalviya14
Copy link

@cmanuelf87
goToStep: function (stepNum) {
this._showStep(stepNum);
},
is not working.

@cmanuelf87
Copy link

Hi @RajeshMalviya14
if you want you can put the file where you placed the function to review what may be missing

@AdrienV
Copy link

AdrienV commented Aug 5, 2018

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);

@buttflattery
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants