X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

jQuery event.currentTarget Property

jQuery Event Methods jQuery Event Methods

Example

event.currentTarget is typically equal to this:

$("h1,h2,p").click(function(event){
  alert(event.currentTarget === this);
});

Try it yourself

Definition and Usage

The event.currentTarget property is the current DOM element within the event bubbling phase, and is typically equal to this.


Syntax

event.currentTarget

Parameter Description
event Required. The event parameter comes from the event binding function


Examples

Try it Yourself - Examples

Return the content of elements
Using event.currentTarget.innerHTML to return content of elements.


jQuery Event Methods jQuery Event Methods


Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook