Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(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