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).
Remember
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);
});
Read it inside any handler to learn where the event started.
Bind with .on() on a parent or the element itself.
Inside the handler, read event.target (native Element).
Optionally wrap: $(event.target) for .is() / .closest().
Compare to this when you need “direct vs bubbled”.
Act only when the target matches the control you care about.
Piece
Required?
Role
event argument
Yes
jQuery event object
event.target
Yes (to inspect origin)
Deepest initiating element
$(event.target)
Optional
jQuery methods on the origin
event.target === this
Optional
Detect direct vs bubbled click
Pseudocode
Pseudocode
parent.on("click", handler)
when click anywhere under parent:
target = deepest element clicked
currentTarget / this = parent (or matched delegate)
if target === this:
direct click on parent
else:
bubbled from a child (target)
// Delegation: filter with $(target).is("li") or .closest(".tool")
Reference
Cheat Sheet
Keep these facts handy while reading event origins.
Topic
Detail
Type
Property → Element
Since
jQuery 1.0
Meaning
Element that initiated the event
May be
Bound element or a descendant
vs this
Equal on direct click; differ when bubbled
Delegation
Inspect with .is() / .closest()
Try it
Live Preview
Click each block — the log shows event.target.nodeName, like the official demo.
Click
span blockstrong block
paragraph block
One handler logs event.target.nodeName for whoever you click.
Log
Click span, strong, or paragraph.
Practice
jQuery Examples
Short labs — each has View Output, Try It Yourself, and How It Works.
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.
Takeaway. Origin can differ from the bound element.
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();
Clicks often hit a child span. Use .closest() to reach the control.
vs
Confused with currentTarget
Target = who started it. CurrentTarget = whose handler ran. They match only on direct clicks.
mouse
Not relatedTarget
relatedTarget is the other element on mouseover/mouseout — different property.
Compatibility
Browser Support
event.target is a standard DOM Event property. jQuery exposes it on the normalized event object since 1.0. Works wherever your loaded jQuery version runs.
✓ Stable · Event property
event.target
Supported in all modern browsers via the DOM Event API. Prefer jQuery 3.x for a consistent event object with target, currentTarget, and delegateTarget.
100%Property support
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Chromium & Legacy
Full support
Internet ExplorerIE 6+ · Legacy environments
Full support
OperaAll modern versions
Full support
targetUniversal
Bottom line: Safe for production. Use target for the click origin; use currentTarget for the handler element; use closest() when icons nest inside buttons.
Analysis
Performance Notes
Approach
Cost
Best for
Read event.target
Free
Identifying the origin
$(event.target)
Tiny wrap
Calling jQuery methods
One parent + filter
Cheap
Menus, lists, toolbars
Bind every child
Heavier
Avoid when the list is large/dynamic
Reading target has no meaningful cost. Prefer one delegated parent handler that filters with .is() / .closest() over binding every child.
Remember
Key Takeaways
Role: the element that initiated the event.
vs this: equal on direct click; differ when bubbled.
Delegation: filter with .is() or .closest().
Native: wrap with $() only when needed.
One line:event.target answers “which element started this event?”
Frequently Asked Questions
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.