jQuery keydown() Event

Last Updated Jul 21, 2015, 12:00:06 PM





jQuery keydown() Event

The jQuery keydown() method triggers the keydown event, or attaches a function to run when a keydown event occurs.

Syntax

jQuery keydown() method behaviour can also be performed by .on( "keydown", handler ) and trigger( "keydown" ). Basically keydown() event is fired when the user press down arrow key on the keyboard.

In this example, the no.of times, the keydown event occurs is shown as a result when the user try to press the down arrow key on the keyboard.

Example

Try It Now

Other Advanced jQuery Events you might want to learn
jQuery Complete Events Reference

jQuery Events

jQuery Document Events

jQuery Keyboard Events

jQuery Mouse Events


Sources and Credits

The content and methods in the tutorial has been referred and updated with jQuery API and The jQuery Foundation

Last Updated Jul 21, 2015, 12:00:06 PM