How can i check if key is pressed during click event with jquery?
Posted
by daniel smith
on Stack Overflow
See other posts from Stack Overflow
or by daniel smith
Published on 2010-03-15T07:25:46Z
Indexed on
2010/03/15
7:39 UTC
Read the original article
Hit count: 249
Hi,
I would like to catch a click event with jquery and be able to tell if a key was pressed at the same time so i can fork within the callback function based on the keypress. for example:
$("button").click(function()
{
if([KEYPRESSED WHILE CLICKED])
{
do something...
} else {
do something different...
}
});
Does anyone know if this is possible at all or how it can be done if it is possible?
© Stack Overflow or respective owner