diff --git a/entries/event.currentTarget.xml b/entries/event.currentTarget.xml
index 5a3f8b0a..c1a0418a 100644
--- a/entries/event.currentTarget.xml
+++ b/entries/event.currentTarget.xml
@@ -2,16 +2,225 @@
This property will typically be equal to the If you are using jQuery.proxy or another form of scope manipulation, This property will typically be equal to the If jQuery.proxy or another form of scope manipulation is used,
+ The W3C DOM Event interface includes a
+ Consider this markup:
+
+ When event registration is direct,
+ When event registration is delegated,
+ In both of the preceding examples, the event listener is actually registered on the
+ If event registration is delegated, in jQuery 1.7+ the value that the standard this
of the function.this
will be equal to whatever context you have provided, not event.currentTarget
-
event.target
, or an ancestor if the event is bubbling.this
of the function.this
will be equal to whatever context was provided, not event.currentTarget
..currentTarget
property ("standard .currentTarget
"), that some browsers implement in their native event objects. jQuery's event.currentTarget
may or may not contain the same value as the standard .currentTarget
: it depends whether the event listener registration was direct or delegated. event.delegateTarget
(available from jQuery 1.7) will contain the value of the standard .currentTarget
.
+
+
+ $( "p" ).on( 'click', handler )
, then event.currentTarget
will have the same value as the standard .currentTarget
: the current DOM element within the event bubbling phase. This call to .on()
would result in event.currentTarget
being set to the p
.
+ $( "p" ).on( 'click', "span", handler )
, then event.currentTarget
will be set to the DOM element that matches the selector (in this case, "span"). In this scenario jQuery sets event.currentTarget
as if the event were registered directly on the element that matches the selector. This call to .on()
would result in event.currentTarget
being set to the span
.
+ p
and the event is handled when bubbling reaches the p
. The standard .currentTarget
property would be set to the p
.
+ .currentTarget
would have can be accessed as event.delegateTarget
. In browsers that implement the standard .currentTarget
in their native event object, it can be accessed as event.originalEvent.currentTarget
.
+
+
+
+
+ event
target properties for direct and delegated events.
+
+
+
+
+
+
+
+ Direct event registration
+
+
+
+
+
+
+
+
+ Registration code
+
+
+
+
+
+ $( "p" ).on( 'click', handler )
+
+
+
+
+
+
+ Property
+
+
+
+ Element
+
+
+
+
+
+
+
+
+
+
+ event.currentTarget
+
+
+
+ p
+
+
+
+
+
+
+
+
+ event.delegateTarget
+
+
+
+ p
+
+
+
+
+
+
+
+
+
+
+
+
+
+ event.originalEvent.currentTarget
+
+
+
+ p
+
+
+
+
+
+
+ Delegated event registration
+
+
+
+
+
+
+
+
+ Registration code
+
+
+
+
+
+ $( "p" ).on( 'click', "span", handler )
+
+
+
+
+
+
+ Property
+
+
+
+ Element
+
+
+
+
+
+
+
+
+
+
+ event.currentTarget
+
+
+
+ span
+
+
+
+
+
+
+
+
+ event.delegateTarget
+
+
+
+ p
+
+
+
+
+
+
+
+
+
+
+ event.originalEvent.currentTarget
+
+
+
+ p
+
+