.dblclick() is a shorthand for binding or triggering the dblclick event. With a handler it binds; with no arguments it triggers. Prefer .on / .trigger in new code.
Optional data (1.4.3+): .dblclick({ key: "v" }, handler) → event.data.
Trigger (legacy): .dblclick() with no args — or use .trigger("dblclick").
Piece
Required?
Role
handler
For bind
Runs on each double-click
eventData
Optional
Available as event.data
No args
—
Triggers dblclick on the set
Return value
—
jQuery set (chainable)
Pseudocode
Pseudocode
function dblclick(element, handler?):
if handler given:
bind "dblclick" → handler // like .on("dblclick", handler)
else:
trigger "dblclick" // like .trigger("dblclick")
// Prefer naming the event explicitly with on / trigger
Reference
Cheat Sheet
Quick map from shorthand to modern calls.
Legacy
Modern
.dblclick(fn)
.on("dblclick", fn)
.dblclick(data, fn)
.on("dblclick", data, fn)
.dblclick()
.trigger("dblclick")
Unbind dblclick
.off("dblclick")
Added
1.0 (data form 1.4.3)
Status
Deprecated 3.3+
Try it
Live Preview
Run presets that show bind, eventData, and no-arg trigger via .dblclick() (simulated with trigger so you can click once).
Legacy demos for reading old code — prefer .on / .trigger in new projects.
Result
Handler ran via .dblclick(fn).
Code
jQuery Examples
Short snippets for legacy .dblclick(). Prefer the modern forms in new work — use Try It Yourself to experiment.
Example 1 — Bind with .dblclick(handler)
Deprecated shorthand for .on("dblclick", handler).
jQuery
$("#target").dblclick(function () {
console.log("Handler ran via .dblclick(fn).");
});
.dblclick() with no arguments fires the event — prefer .trigger("dblclick").
jQuery
$("#target").dblclick(function () {
console.log("Handler for dblclick called.");
});
$("#fire").click(function () {
$("#target").dblclick(); // same idea as .trigger("dblclick")
});
.dblclick(fn) is a thin wrapper around .on("dblclick", fn).
.on supports delegation and is not deprecated.
New projects should only use .on / .trigger / .off.
Edge Cases & Pitfalls
Common traps when reading or writing .dblclick() code.
deprecated
Do not use in new code
Binding forms are deprecated since 3.3. Teach and write .on("dblclick") instead.
overload
Bind vs trigger looks similar
.dblclick(fn) binds; .dblclick() triggers. Check the arguments before assuming.
delegation
No child-selector form
.dblclick() cannot do .on("dblclick", "li", fn). For dynamic lists, use .on with a selector.
conflict
Avoid click + dblclick on one element
Same as the modern event: browsers differ on how many clicks fire before dblclick.
compat
Still works in jQuery 3.x
Legacy apps keep running. Migrate when you edit those files — no rush to rewrite everything at once.
Compatibility
Browser Support
.dblclick() has existed since jQuery 1.0 (eventData since 1.4.3). It still runs in jQuery 3.x browsers, but is deprecated since 3.3 — prefer .on("dblclick") / .trigger("dblclick").
✓ Deprecated 3.3+
.dblclick() shorthand
Works wherever jQuery event APIs work in the browser. Use on/trigger for new code.
Switching to .on / .trigger does not slow you down — it clarifies intent and unlocks delegation.
Remember
Key Takeaways
Deprecated:.dblclick(handler) since jQuery 3.3.
Bind: use .on("dblclick", fn) instead.
Fire: use .trigger("dblclick"), not bare .dblclick().
Legacy OK: still runs in 3.x — migrate when you touch the file.
One line:.dblclick() is a deprecated shorthand — prefer .on("dblclick") and .trigger("dblclick").
Frequently Asked Questions
With a handler — .dblclick(handler) or .dblclick(eventData, handler) — it binds a double-click callback. With no arguments — .dblclick() — it triggers dblclick on each matched element. The binding forms are deprecated since jQuery 3.3.
Yes. Prefer .on("dblclick", handler) or .on("dblclick", eventData, handler) to bind, and .trigger("dblclick") to fire. jQuery 3.x still runs .dblclick() for compatibility.
.dblclick(handler) only registers a callback. .dblclick() with no arguments triggers the event (same idea as .trigger("dblclick")).
Replace .dblclick(fn) with .on("dblclick", fn). Replace .dblclick(data, fn) with .on("dblclick", data, fn). Replace no-arg .dblclick() with .trigger("dblclick").
Yes for legacy code. It still works, but new code should use .on / .trigger. See the dblclick event tutorial for the modern API.
Since 1.4.3 you can pass data before the handler. It appears as event.data inside the callback. Modern form: .on("dblclick", eventData, handler).