Web Development with jQuery®

(Elliott) #1

(^520) ❘ APPENDIX D EVENTS
event.isDefaultPrevented()
returns boolean
Determines whether preventDefault() was ever called
on the event object.
event.isImmediatePropaga-
tionStopped()
returns boolean
Determines whether stopImmediatePropagation() was
ever called on the event object.
event.isPropagationStopped()
returns boolean
Determines whether stopPropagation() was ever called
on the event object.
event.keyCode
integer
The numeric offset representing which key on the key-
board is currently being pressed.
event.layerX, event.layerY
integer
Coordinates of the event relative to the current layer.
event.metaKey
boolean
Whether the Command key (Mac) or Windows key
(Windows) is pressed.
event.namespace The namespace specifi ed when the event was triggered.
event.originalEvent A copy of the browser’s original event object, before
jQuery’s modifi cations were made to it.
event.originalTarget The original target of the event before any retargeting.
event.pageX, event.pageY
integer
The mouse coordinates relative to the document.
event.preventDefault() Prevents the browser’s default action for a given event, for
example, submitting a form or navigating to the href attri-
bute of an element.
event.relatedTarget Finds another element involved in the event, if applicable.
event.result The last value returned by an event handler that was trig-
gered by this event, unless the value was undefined.
event.screenX, event.screenY
integer
Returns the horizontal coordinates of the event within the
context of the entire screen.
event.shiftKey
boolean
Whether the Shift key (Mac and Windows) is pressed.
event
.stopImmediatePropagation()
Prevents other attached listeners for the same event from
being called.
(continued)
http://www.it-ebooks.info

Free download pdf