I\'m trying to run a method when the enter key has been pressed. This method is already being used by a button. Basically, when the user fills in a text field and clicks a s
$(document).keydown(function(e) { // test for the enter key if (e.keyCode == 13) { // Do your function myFunction(); } });