generate functionSun, 11 Dec 2022

detect enter key and any focused input field

$(document).keypress(function (e) { if (e.which == 13) { $(':focus').trigger('enterKey'); } });

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant