Created
June 27, 2014 12:07
-
-
Save jbutko/29a27933dce0cd42d054 to your computer and use it in GitHub Desktop.
jQuery: Re-enable e.preventDefault() event
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
$('form').submit( function(ev) { | |
ev.preventDefault(); | |
//later you decide you want to submit | |
$(this).unbind('submit').submit() | |
}); | |
//From http://stackoverflow.com/questions/5651933/what-is-the-opposite-of-evt-preventdefault |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thank you! that worked like magic.