Skip to content

Instantly share code, notes, and snippets.

@mo-gr
Created September 29, 2011 14:47
Show Gist options
  • Save mo-gr/1250882 to your computer and use it in GitHub Desktop.
Save mo-gr/1250882 to your computer and use it in GitHub Desktop.
Can you spot the error?
$("input[type='text']").keyup(function(e) {
if ( e.which == 13 || e.which == 10 ) // on Return/Enter key, blur the input to execute update
$(this).blur();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment