Hi I would like to know if its possible to do something similar to the example shown below.
// Script A
$('.submitButton').click(function() {
if (not valid) {
$(this).attr("disabled", "disabled");
}
});
// Script B
$('.submitButton').click(function() {
// Do something else here
});
I would like to know whether you can actually stop the click event in Script B if not valid in Script A. The reason for the two events being separate is due to the fact that Script A will be used as a sort of a plugin module which will be inserted at the header of the page.