Created
October 14, 2014 15:52
-
-
Save gerasimua/8d74f8491a803170d7a1 to your computer and use it in GitHub Desktop.
Prevent send form by pressing enter
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
$('body').on("keyup keypress", '#addAds', function(e) { | |
var code = e.keyCode || e.which; | |
if (code == 13) { | |
e.preventDefault(); | |
e.stopPropagation(); | |
return false; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment