Skip to content

Instantly share code, notes, and snippets.

@fliiiix
Created September 27, 2013 08:28
Show Gist options
  • Save fliiiix/6725648 to your computer and use it in GitHub Desktop.
Save fliiiix/6725648 to your computer and use it in GitHub Desktop.
Do What The Fuck You Want To Public License Diable the Enter event, even in IE 8. With Jquery 1.4.1. And There is a but if you use `$(window).keydown(function (event) {` the keydown doesn't get executed.
$(document).ready(function () {
$(document).keydown(function (event) {
if (event.keyCode == 13) {
event.preventDefault();
return false;
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment