To check if enter was pressed in jQuery you can use the following snippet.
Sample jQuery
$('#element').keyup(function(e) { if(e.keyCode == 13) { alert('Enter was pressed.'); } });
All the Code Snippets and Samples you need
To check if enter was pressed in jQuery you can use the following snippet.
$('#element').keyup(function(e) { if(e.keyCode == 13) { alert('Enter was pressed.'); } });
You must be logged in to post a comment.
RT @CodeSnippetsNET: How to check if enter was pressed in #jQuery http://t.co/8yi6qTsY36 #js #javascript #html
RT @CodeSnippetsNET: How to check if enter was pressed in #jQuery http://t.co/8yi6qTsY36 #js #javascript #html