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

Initialize wizard multiple times after dom update #64

Open
mersed opened this issue Jan 3, 2019 · 0 comments
Open

Initialize wizard multiple times after dom update #64

mersed opened this issue Jan 3, 2019 · 0 comments

Comments

@mersed
Copy link

mersed commented Jan 3, 2019

I am not able to initialize wizard second time. After page is rendered for the first time, and when content is changed dynamicly with java script - initializing wizard second time is not working.

Consider this:

function createWizard(content) {
    this.$("#campaign-creator-wizard").smartWizard("destroy");
    this.$("#campaign-creator-wizard").empty();
    this.$("#campaign-creator-wizard").append(content);

    this.$("#campaign-creator-wizard").smartWizard({
        showStepURLhash: false,
        useURLhash: false,
    });
}

Initial call of this function works fine (and as you can see - even in the first place content was loaded dynamicly). Seems that, I am not clearing/destroying this wizard properly or something - to reinitialize it again. Because, any other call of this function will not initialize wizard.

Am I missing something here - or in general, re initialization is not possible ?

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

1 participant