English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The event.currentTarget property is the current DOM element within the event bubbling phase, usually equal to this.
event.currentTarget
Alert that currentTarget matches the this keyword:
$("p, div, :header").click(function(event){ alert(event.currentTarget === this); });Test and see‹/›
Return the content of the element:
$("p, div, :header").click(function(event){ alert(event.currentTarget.textContent); });Test and see‹/›
Parameter | Description |
---|---|
event | TheEventParameters come from the event binding feature |