Passing submit event to submitHandler callback

This commit is contained in:
razola
2011-10-17 20:02:08 +03:00
parent 732f5ff04b
commit a82784825c

2
jquery.validate.js vendored
View File

@@ -63,7 +63,7 @@ $.extend($.fn, {
// insert a hidden input as a replacement for the missing submit button
var hidden = $("<input type='hidden'/>").attr("name", validator.submitButton.name).val(validator.submitButton.value).appendTo(validator.currentForm);
}
validator.settings.submitHandler.call( validator, validator.currentForm );
validator.settings.submitHandler.call( validator, validator.currentForm, event );
if (validator.submitButton) {
// and clean up afterwards; thanks to no-block-scope, hidden can be referenced
hidden.remove();