Skip to content

Instantly share code, notes, and snippets.

@tommcfarlin
Created August 7, 2015 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tommcfarlin/acdc3ced372aa9fa1d14 to your computer and use it in GitHub Desktop.
Save tommcfarlin/acdc3ced372aa9fa1d14 to your computer and use it in GitHub Desktop.
(function( $ ) {
'use strict';
$( document ).on( 'keypress', function( evt ) {
if ( 13 === evt.which ) {
/* Define your functionality here. Note that if you have
* code that's being duplicated for, say, a 'click' handler,
* then abstract the code into a function and just make a
* call to the function.
*/
}
});
})( jQuery );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment