I\'m trying to do a function if enter is pressed while on specific input.
What I\'m I doing wrong?
$(document).keyup(function (e) { if ($(\".inpu
The solution that work for me is the following
$("#element").addEventListener("keyup", function(event) { if (event.key === "Enter") { // do something } });