I am currently utilizing this particular control, which happens to be version 3 of jQuery Smart Wizard.
Here is the code snippet for the smart wizard:
$('#wizard').smartWizard({transitionEffect:'slide'});
These are some helper functions written in JavaScript:
function disableNextButton(){
var $actionBar = $('.actionBar');
$('.buttonNext', $actionBar).addClass('buttonDisabled').off("click");
}
function enableNextButton(){
var $actionBar = $('.actionBar');
$('.buttonNext', $actionBar).removeClass('buttonDisabled');
}
The CSS class actionBar is utilized to style the area where previous, next, and finish buttons are located. The style buttonNext is applied to the next button, while the style buttonDisabled gives a gray color to a disabled button. All these styles can be found within the Smart Wizard CSS files.
The issue I am facing is that while I can disable the button click event using the ".off" function of jQuery, I am unable to restore the original event handler with the ".on" method.
My question is: How can I restore the next button's click event after it has been disabled?
Thank you.