jquery-smartwizard icon indicating copy to clipboard operation
jquery-smartwizard copied to clipboard

Initialize wizard multiple times after dom update

Open mersed opened this issue 7 years ago • 0 comments

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 ?

mersed avatar Jan 03 '19 00:01 mersed