event.delegateTarget is the DOM element where the handler was attached. Most useful with delegated .on("click", "button", fn) — it names the ancestor, not the matched child. Added in jQuery 1.7.
Syntax
Start with these common calls. Keep them short and readable.
jQuery
event.delegateTarget // Element — where .on() was called
event.currentTarget // Element — usually === this (matched / handler element)
event.target // Element — deepest click origin
// Official idea
$(".box").on("click", "button", function (event) {
$(event.delegateTarget).css("background-color", "red");
// this = button; delegateTarget = .box
});
// Direct bind (no selector):
// delegateTarget === currentTarget
Call
What it does
Parent collection
Where .on() is called → delegateTarget
Selector
Filter which children run the handler
this
Matched child element
event.delegateTarget
Attach parent element
Load jQuery before your script (CDN or local file), then wrap DOM work in $(function () { ... }) when needed.
Parameters
Parameter
Description
Step 1
Choose a stable parent ($(".box"), $("#list"), …).
Step 2
Bind with a selector: .on("click", "button", handler).
Step 3
Inside the handler, use this for the matched child.
Return Value
Return Value
Description
See examples
Check the examples below for what this API returns in common cases.
jQuery Examples
Example 1 — Official: Paint the Box
Click a button; style event.delegateTarget (the .box).
jQuery
$(".box").on("click", "button", function (event) {
$(event.delegateTarget).css("background-color", "red");
});
Direct. No selector — the handler is on #btn itself.
Click. Both properties point at that same element.
Rule. Official docs: non-delegated → always equal.
Frequently Asked Questions
event.delegateTarget is the DOM element where the currently running jQuery handler was attached. For $(".box").on("click", "button", fn), it is the .box ancestor — not the button. Available since jQuery 1.7.
In a delegated handler, this (and usually event.currentTarget) is the element that matched the selector — the clicked button. event.delegateTarget is the parent where you called .on(). Use this for the child; use delegateTarget for the container.
On a direct bind (no selector), yes — delegateTarget equals currentTarget. On a delegated bind, currentTarget is the matched child; delegateTarget is the attach parent.
When a delegated handler must update the container (official .box highlight), call .off() at the bind point, or tell which of several delegated roots handled the event.
Yes. For .on("click", fn) with no selector, delegateTarget is still set and equals currentTarget — the element you bound to.
No. It is a jQuery event-object property for naming the attach point. Native events expose currentTarget during bubbling; jQuery adds delegateTarget for delegated .on() / .delegate() handlers.