The dblclick event fires when a pointing device button (e.g., a mouse's primary button) is clicked twice on a single element.

dblclick fires after two click events.

Bubbles Yes
Cancelable Yes
Interface MouseEvent
Event handler property ondblclick

Examples

This example toggles the size of a card when you double click on it.

HTML

<aside>
  <h3>My Card</h3>
  <p>Double click to resize this object.</p>
</aside>

CSS

aside {
  background: #fe9;
  border-radius: 1em;
  display: inline-block;
  padding: 1em;
  transform: scale(.9);
  transform-origin: 0 0;
  transition: transform .6s;
}

.large {
  transform: scale(1.3);
}

JavaScript

const card = document.querySelector('aside');

card.addEventListener('dblclick', function (e) {
  card.classList.toggle('large');
});

Result

Specifications

Specification Status
UI Events
The definition of 'dblclick' in that specification.
Working Draft
Document Object Model (DOM) Level 3 Events Specification
The definition of 'dblclick' in that specification.
Obsolete

Browser compatibility

No compatibility data found. Please contribute data for "api.Element.dblclick" (depth: 1) to the MDN compatibility data repository.

See also