Ben
Member since Sep 22, 2012
- Profile: /members/10301-ben.htm
- Comments: 2
Recent Blog Comments By Ben
-
Mouse vs. Keyboard - Determining Click Initiator Using A jQuery Custom Event
Posted on Sep 22, 2012 at 10:51 PM
On second thought, if you look at the top level of the jquery Event object, it is pretty weird that keyboard events are in fact stored as mouse events. But if you dig a little deeper into the object, you can see that X-Y coordinates are stored for each click. For example, "clientX". For cl... read more »
-
Mouse vs. Keyboard - Determining Click Initiator Using A jQuery Custom Event
Posted on Sep 22, 2012 at 10:04 PM
Thanks Ben, that's very useful. I was going round the bend trying to figure out the source of a click event. @ross: touchscreens might make this more relevant, not less. In fact, I think there's a case for building this into jquery core, so that you could easily query an origin property on any click... read more »