Created
March 15, 2014 17:39
-
-
Save nobodyplace/9571024 to your computer and use it in GitHub Desktop.
hotkeys-sample-keypress-3
This file contains 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
//return key | |
$(document).bind('keypress', 'return', function (evt){ | |
alert('pressed enter/return key'); | |
}); | |
//esc key | |
$(document).bind('keypress', 'esc', function (evt){ | |
alert('pressed ESC key'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment