SyntaxFix
Write A Post
Hire A Developer
Questions
Try this to detect the Enter key pressed.
$(document).on("keypress", function(e){ if(e.which == 13){ alert("You've pressed the enter key!"); } });
See demo @ detect enter key press on keyboard