event.currentTarget
Categories: Event Object
event.currentTargetReturns: Element
Description: The current DOM element within the event bubbling phase.
-
event.currentTarget
version added: 1.0
This property will typically be equal to the this
of the function.
If you are using jQuery.proxy or another form of scope manipulation, this
will be equal to whatever context you have provided, not event.currentTarget
-
Alert that currentTarget matches the `this` keyword.
Code:
$("p").click(function(event) { alert( event.currentTarget === this ); // true });