I use Angular and i don't found who detect if on pressing key out of an input... I try this :
<div (keyup)="moveSlider($event)"></div>
But it does not work
If you can help me! :p (Sorry for my bad english)
I use Angular and i don't found who detect if on pressing key out of an input... I try this :
<div (keyup)="moveSlider($event)"></div>
But it does not work
If you can help me! :p (Sorry for my bad english)
You can't listen for a keyup event outside of an <input>
or a focusable element, so you have to listen it on the <body>
element (for the whole document).
I wrote an example script on jQuery, you can see it here: https://jsfiddle.net/c5stv2a4/