BryanK BryanK - 1 year ago 521
jQuery Question

event.originalEvent jQuery

I am currently immersed in the jQuery learning center. I'm going from start to end.

I just read this paragraph:

It's also important to note that the event object contains a property
, which is the event object that the browser
itself created. jQuery wraps this native event object with some useful
methods and properties, but in some instances, you'll need to access
the original event via
for instance. This is
especially useful for touch events on mobile devices and tablets.

The last sentence, 'This is especially useful for touch events on mobile devices and tablets.', really sparked my interest. but this is as much as the learning center goes into
thus far.

Does anyone know of good resources for a more intensive study/practice for
specifically in relation to touch events/mobile devices?

Answer Source

event.originalEvent is usually just the native event (also described here).

However, if the browser is compatible, and the event was a touch event then that API will be exposed through event.originalEvent.

The short answer is that event.originalEvent is not always the same, it depends on which event type triggered the handler, and on the environment of the browser.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download