Just curious as to everyone's recommendations on detecting the difference
between a jQuery created event object (i.e. $("#el").trigger("click")) and a
real event object (i.e. create by the browser.)

Right now I'm doing:

if( !("ctrlKey" in e) )

I believe the ctrlKey should be sent by every browser when the event action
occurs via a user's action, but just wanted to know if there's a better way.

It would be really nice if jQuery would pass a key that indicates whether an
event object is generated by the browser or by jQuery. I've come across a
few occasions were I needed to do different things based on how the event
was being triggered.

-Dan

Reply via email to