How to do the S searchbox like here?
February 26th, 2022
I know how to do the dialog ofc but I need to first get a working code that makes something happen when the users hits S and only like here, eg not when I’m typing here and type s.
What is your code?
You can also view the source code of the S listener.
$("body").on("keyup",function(e){
console.log(e.which);
if ( e.which === 83) {
$("#contactus").dialog( "open" );
}
});
The problem is this works but makes the dialog open even if I’m typing here and the letter s is typed.
Here it only works if I’m not active in an input.
I need an other check in my code.
Also I don’t see any source code listener in view sources tab.
You can make the listener work only outside typing boxes.
What listener are you talking about and that is exactly what I want to do… So can you help me with a working code? Your above message does not solve my issue.