Skip to content

Instantly share code, notes, and snippets.

@tpthn
Created July 5, 2012 15:41
Show Gist options
  • Save tpthn/3054424 to your computer and use it in GitHub Desktop.
Save tpthn/3054424 to your computer and use it in GitHub Desktop.
jQuery - trigger enter on button for textbox input
$("#id_of_textbox").keyup(function(event){
if(event.keyCode == 13){
$("#id_of_button").click();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment