$("#textbox").one("click", function () {
});
How would I add support for the tab key? If the user on the previous textbox and then clicks the tab key and ends up on #textbox, that’s when the function should be ran, as well as when the user decides to click instead of using the tab key.
You can bind to the
focusevent instead of theclickevent:From MDN:
and