I am using jquery validation engine and I noticed that every time I spam the clicks on the submit button , it takes longer to close and the $("#FORM").validationEngine('hide');
doesn't take effect , I am using Position Absolute Jquery Validation Engine
Here is some of my code
This is to prevent submission upon pressing the submit button:
$('#contactForm').on('submit', function (e) {
if (!$("#contactForm").validationEngine('validate')) {
}
else {
$('[type="submit"]').prop('disabled', 'disabled');
}
});
This is to Hide the Validations upon canceling the request on the modal view window
$("#btnConfirmEditNo").click(function (e) {
e.preventDefault();
$('#editContactForm').validationEngine('hide');
$('#modalEditWindow').validationEngine('hide');
editwnd.close();
});
In order to actually prevent the default action/event your first code needs to be like this