[jQuery] Determining modifiers on a click event
Hello!
I'm a total jQuery noob. I've browsed the docs and went trough the
tutorial. When trapping click events, I need to determine wether the
event is question was a "click" or a "shift-click". I'm not sure how
to accomplish this within jQuery. Usually, I can look at
event.shiftKey, but I can't seem to figure out how to get at the
event object. Here's the code (almost straight from the tutorial)
I'm starting with:
-------------------------------------------------
$(document).ready(function(){
$("a").click(function(){
alert("click detected");
return false;
});
});
-------------------------------------------------
So, I'm able to detect the click, then cancel the bubbling and
default action. In between those two things, I need to figure out
what modifiers if any (specifically shift) were used. Is there an
easy way to get at the event object? Any thoughts?
Thanks!
-Mike
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/