event.target is the DOM element that initiated the event — often a descendant of the element that registered the handler. Since jQuery 1.0. Compare with this to detect bubbling, and use it for event delegation. Contrast with currentTarget (handler element) and relatedTarget (other element on mouse enter/leave).
Syntax
Start with these common calls. Keep them short and readable.
jQuery
event.target // Element that started the event
event.currentTarget // Element whose handler is running
this // Usually === currentTarget
// Official pattern — log the tag name
$("body").on("click", function (event) {
$("#log").html("clicked: " + event.target.nodeName);
});
Call
What it does
event argument
jQuery event object
event.target
Deepest initiating element
$(event.target)
jQuery methods on the origin
event.target === this
Detect direct vs bubbled click
Load jQuery before your script (CDN or local file), then wrap DOM work in $(function () { ... }) when needed.
Parameters
Parameter
Description
eventtarget
Used in $(event.target). jQuery methods on the origin
Return Value
Return Value
Description
See examples
Check the examples below for what this API returns in common cases.
jQuery Examples
Example 1 — Official nodeName Log
Click nested blocks; log the initiating tag.
jQuery
$("body").on("click", function (event) {
if ($(event.target).closest("#out").length) return;
$("#out").text("clicked: " + event.target.nodeName);
});
Click span → clicked: SPAN
Click strong → clicked: STRONG
Click p → clicked: P
How It Works
Body handler. One listener for the whole page.
Skip the log. Ignore clicks on the output itself.
Read target.nodeName is the tag in uppercase.
Example 2 — Official ul Delegation Toggle
Click an li to toggle its nested list — official pattern.
jQuery
function handler(event) {
var target = $(event.target);
if (target.is("li")) {
target.children("ul").toggle();
}
}
$("ul").first().on("click", handler).find("ul").hide();
event.target is the DOM element that initiated the event — the deepest element the user interacted with. Available since jQuery 1.0. It is a native Element, not a jQuery collection.
event.target is where the event started. event.currentTarget is the element whose handler is running. Click a span inside a button: target is the span; currentTarget on the button handler is the button.
When event.target === this, the user interacted with the bound element itself. When they differ, the event bubbled from a descendant — useful for nested icons, links inside rows, or panel backgrounds.
Bind one handler on a parent, then inspect $(event.target) with .is(), .closest(), or a selector filter before acting. The official ul demo uses target.is("li") to toggle nested lists only when an li was clicked.
No. event.target is the element for the current event. event.relatedTarget is the other element in mouseover/mouseout transitions. relatedTarget is for mouse enter/leave style events; target applies to all event types.
Only when you want jQuery methods. event.target.nodeName is fine on the native element. Use $(event.target).is("li") or .closest(".tool") when you need the jQuery API.