event.currentTarget
The event.currentTarget
property in jQuery refers to the current DOM element within the event bubbling phase.
It's usually equal to the this
of the handler function.
event.currentTarget
property ExampleAlert that currentTarget matches the this
keyword and debug the event.currentTarget
property.
$( "p" ).click(function( event ) { alert( event.currentTarget === this ); // true console.log(event.currentTarget); });