jQuery event.currentTargetProperty
Example
event.currentTarget is usually equal tothis:
$("h1,h2,p").click(function(event){
alert(event.currentTarget === this);
});
alert(event.currentTarget === this);
});
Try it
Definition and Usage
The event.currentTarget property is the current DOM element within the event bubbling phase, usually equal tothis。
Syntax
event.currentTarget
| Parameter | Description |
|---|---|
| event | Required.eventThe parameter comes from the event binding function. |
More Examples
Return the content of an element
Use event.currentTarget.innerHTML to return the content of an element.
Other Extensions
jQuery Event Methods