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

how to prevent double click on finish button ?

Open themhz opened this issue 7 years ago • 2 comments

This is what I do, but without success onFinished: function (event, currentIndex) { $("#example-advanced-form .actions a[href='#finish']").prop( "disabled", true ); //other stuff }

themhz avatar Dec 06 '17 09:12 themhz

I think you should declare a global boolean variable to check did user click on finish button or not

coffeduong avatar Jan 29 '18 04:01 coffeduong

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>",

amard33p avatar Aug 23 '19 12:08 amard33p