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

Initialization callback? #80

Closed
mklickman opened this issue Jul 31, 2014 · 3 comments
Closed

Initialization callback? #80

mklickman opened this issue Jul 31, 2014 · 3 comments

Comments

@mklickman
Copy link

Is there any way to run arbitrary JavaScript once a wizard has been initialized? The existing events are definitely helpful, it would just be nice to be able to run some code as soon as my wizard is ready to go. I'm looking for either a function callback or an event to listen for, something like:

$('#wizard-1').steps({
    onInit: function(event, currentIndex) {
        // arbitrary code here
    }
});

or

$(window).on('onWizardInit', function(event) {
    // arbitrary code here
});

If I knew how to write that into the plugin, I would :-/

@rstaib
Copy link
Owner

rstaib commented Aug 1, 2014

Perhaps I will add such kind of callback to the current version otherwise to version 2.0.0.

@mklickman
Copy link
Author

That would be amazing!

Any tips on how I could write that into my local code, just to at minimum fire off some sort of custom event I can listen for on the document? I'm using timeouts now, which is incredibly dirty and brittle and literally all I need to know is when the wizard is ready.

I have pretty much no experience making custom events, so any pointers would be stellar.

@mklickman
Copy link
Author

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

No branches or pull requests

2 participants