jquery-steps
jquery-steps copied to clipboard
how to prevent double click on finish button ?
This is what I do, but without success onFinished: function (event, currentIndex) { $("#example-advanced-form .actions a[href='#finish']").prop( "disabled", true ); //other stuff }
I think you should declare a global boolean variable to check did user click on finish button or not
The answer here did not work for me. After disabling button I could not find a proper hook to enable it back. So I used css to disable it. CSS from this answer. Usage:
var finishButton = $('#wizard').find('a[href="#finish"]');
# To disable
finishButton.addClass("disabled");
# To enable
finishButton.removeClass();
Instead of using find to locate the button, ID can be assigned by editing the source code:
Line 1058
buttonTemplate = "<li><a href=\"#{0}\" id=\"{0}Button\" role=\"menuitem\">{1}</a></li>",