dblclick is sent when an element is double-clicked. Bind it with .on("dblclick", handler) (jQuery 1.7+). Any HTML element can receive it.
Remember
$("#target").on("dblclick", function () { ... })
$("#target").trigger("dblclick")
// Needs two clicks inside the element
// (down → up → down → up, within the OS window)
// Prefer on/trigger — not the deprecated .dblclick()
Select an element, bind with .on, optionally trigger from code.
Select the element(s): $("#box"), $("p"), etc.
Bind: .on("dblclick", function (event) { ... }).
Double-click the element (or call .trigger("dblclick")).
Unbind with .off("dblclick") when needed.
Piece
Required?
Role
"dblclick"
Yes
Event type string for .on / .trigger
handler
Yes (bind)
Runs on each double-click
eventData
Optional
Extra data passed into the handler
Return value
—
jQuery set (chainable)
Pseudocode
Pseudocode
function onDblclick(element, handler):
when press + release inside element
and press + release again inside element
within the system double-click window:
handler(event)
trigger(element, "dblclick"):
run all dblclick handlers on element
Reference
Cheat Sheet
Keep these facts handy while wiring double-click handlers.
Topic
Detail
Bind
.on("dblclick", handler) (1.7+)
Trigger
.trigger("dblclick") (1.0+)
Sequence
Two clicks inside the element (OS timing)
Delegation
.on("dblclick", childSelector, fn)
Unbind
.off("dblclick")
Deprecated
.dblclick() shorthand (3.3+)
Avoid
Both click and dblclick on one element
Try it
Live Preview
Run presets that use .on("dblclick") and .trigger("dblclick") (simulated with trigger so you can click once).
Uses .on("dblclick") and .trigger("dblclick") — same ideas as the examples below.
Result
Handler for dblclick called.
Code
jQuery Examples
Short, copy-ready snippets. Open DevTools Console, or use Try It Yourself for a live editor.
Example 1 — Bind a Double-Click Handler
Official style: .on("dblclick", …) on a target element.
jQuery
$("#target").on("dblclick", function () {
console.log("Handler for dblclick called.");
});
Fire the same handlers with a single click on another control.
jQuery
$("#target").on("dblclick", function () {
console.log("Handler for dblclick called.");
});
$("#other").on("click", function () {
$("#target").trigger("dblclick");
});
One parent handler covers current and future children.
jQuery
$("#list").on("dblclick", "li", function () {
console.log("Edit: " + $(this).text());
});
// Later…
$("#list").append("<li>New file</li>");
// New file is double-clickable too — no extra bind
Watch these when relying on double-click handlers.
deprecated
Avoid .dblclick() shorthand
Deprecated in 3.3. Use .on("dblclick") / .trigger("dblclick") / .off("dblclick").
conflict
Don’t mix click + dblclick casually
Some browsers fire one click before dblclick; others fire two. Pick one gesture, or delay the click and cancel on dblclick.
timing
Double-click window varies
Max time between clicks is OS- and browser-dependent (and often user-configurable). Don’t hard-code a fragile interval.
pointer
Pointer must stay inside
All four steps (down/up/down/up) need the pointer inside the element. Leaving mid-gesture can cancel dblclick.
dynamic
New DOM nodes need delegation
Binding only existing elements misses later inserts. Prefer .on("dblclick", "child", fn) on a stable parent.
Compatibility
Browser Support
The native dblclick event works in all browsers. Bind with .on("dblclick") since jQuery 1.7; .trigger("dblclick") since 1.0. Prefer these over the deprecated .dblclick() shorthand (3.3+).
✓ jQuery 1.7+ (.on)
dblclick event
Supported everywhere jQuery event APIs run in the browser. Use on/trigger for modern code.
100%Browser 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
on("dblclick")Excellent
Bottom line: Bind with .on("dblclick", fn). Trigger with .trigger("dblclick"). Avoid binding both click and dblclick on the same element.
Analysis
Performance Notes
Approach
Cost
Best for
Direct .on("dblclick")
1 handler / element
Few static controls
Delegated .on
1 handler / parent
Lists / tables / dynamic UI
click + dblclick timers
Extra timers
Only when both gestures are required
Delegation scales better than binding hundreds of individual handlers. If you must support both click and dblclick, keep the delay short and clear timers promptly to avoid leaked timeouts.
Remember
Key Takeaways
Bind:.on("dblclick", handler) — not deprecated .dblclick().
Fire:.trigger("dblclick") for programmatic double-clicks.
Sequence: two clicks inside the element within the OS window.
Conflict: avoid binding both click and dblclick on one element.
One line: use .on("dblclick", fn) to listen and .trigger("dblclick") to fire — prefer that over the deprecated .dblclick() shorthand.
Frequently Asked Questions
dblclick fires when the user double-clicks an element — two full click gestures inside the element within a system-dependent time window. Bind with .on("dblclick", handler) (jQuery 1.7+). Any HTML element can receive it.
Prefer .on("dblclick", handler). The .dblclick(handler) shorthand is deprecated since jQuery 3.3. To fire the event, use .trigger("dblclick") instead of .dblclick().
click is one press+release inside the element. dblclick needs two complete click cycles (down, up, down, up) inside the element within the OS double-click interval.
The jQuery API advises against it. Browsers differ on how many click events fire before dblclick. Prefer one gesture per action, separate elements, or a short click-delay pattern that cancels when dblclick runs.
Call $(selector).trigger("dblclick"). That runs bound dblclick handlers. A common demo: single-click one control to trigger("dblclick") on another.
Per the API: mousedown inside, mouseup inside, mousedown again inside (within the double-click window), then mouseup inside. The max gap between clicks is OS- and browser-dependent.