Created
March 4, 2019 11:52
-
-
Save Farmatique/853e4701e2c2b89e1f94a97cf8757f56 to your computer and use it in GitHub Desktop.
Prevent submit form on Enter press, except textarea
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
$(document).on("keypress", ":input:not(textarea)", function(event) { | |
return event.keyCode != 13; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment