-
Notifications
You must be signed in to change notification settings - Fork 787
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
Wiring up the Finish button #19
Comments
Hi Chris, Isn't the Rafael |
Hi Rafael, $("#form").steps({ But the alert does not fire. I guess I am confused about what code needs to be written in order to capture the event of the Finish button being clicked. Because right now when it's clicked nothing is happening. Thanks for your help. Chris. |
Rafael, here is my code. -Chris
|
Chris, from the source code: /**
* An object that represents the default settings.
* There are two possibities to override the sub-properties.
* Either by doing it generally (global) or on initialization.
*
* @static
* @class defaults
* @for steps
* @example
* // Global approach
* $.steps.defaults.headerTag = "h3";
* @example
* // Initialization approach
* $("#wizard").steps({ headerTag: "h3" });
**/ So you can do the first approach: /**
* Override the Steps plugin's default onFinished method before initializing the plugin.
* Noticed I used $.fn.steps, not $.steps like the above comment snippet tells you to do.
* See: http://learn.jquery.com/plugins/basic-plugin-creation/
*/
$.fn.steps.defaults.onFinished = function (event, currentIndex) {
console.log("I set this globally -- all finished");
};
// Now initialize the plugin
var wizard = $('#wizard').steps(); Or the second approach: var wizard = $("#wizard").steps({
onFinished: function (event, currentIndex) {
console.log("I set this in the constructor -- all finished");
}
}); |
Hello,
I'm having a hard time figuring out how to wire up the finish button and make it do anything productive. Everything else is going okay. I've looked closely at this page for reference: http://www.rafaelstaib.com/category/jQuery-Steps at the onFinished event but I guess I am very confused.
I'm parsing JSON and dynamically injecting tabs based on the JSON. That is going well. But I can't figure out how to make the Finish button fire? I would like to have all the form values from the tabs saved in session and redirect to another page.
Please send advice.
Thanks!
Chris
The text was updated successfully, but these errors were encountered: