Please note, this is a STATIC archive of website www.w3schools.com from 05 May 2020, cach3.com does not collect or store any user information, there is no "phishing" involved.
THE WORLD'S LARGEST WEB DEVELOPER SITE

jQuery dblclick() Event

❮ jQuery Event Methods

Example

Double-click on a <p> element to alert a text:

$("p").dblclick(function(){
  alert("The paragraph was double-clicked");
});
Try it Yourself »

Definition and Usage

The dblclick event occurs when an element is double-clicked.

The dblclick() method triggers the dblclick event, or attaches a function to run when a dblclick event occurs.

Tip: The dblclick event also generates a click event. This can cause problems if both events are applied to the same element.


Syntax

Trigger the dblclick event for the selected elements:

$(selector).dblclick() Try it

Attach a function to the dblclick event:

$(selector).dblclick(function) Try it

Parameter Description
function Optional. Specifies the function to run when the dblclick event occurs

❮ jQuery Event Methods