Created
March 22, 2011 19:15
-
-
Save DCarper/881846 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var form_not_submitted = true; | |
| $( function() { | |
| $("form").validate({ rules: {...}, submitHandler: submitOnce}); | |
| }) | |
| var submitOnce = function(form) { | |
| if ( form_not_submitted ) | |
| { form_not_submitted = false; alert('hi'); form.submit(); } | |
| else { return false } | |
| } | |
| // as is, the alert only fires 1 time but the form can be submitted multiple | |
| // I can literally take the form.submit() call out, and the alerts only fire as expected | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment