Easy Tutorial
❮ Sel Multipleattribute Equal Value Misc Makearray ❯

jQuery dblclick() Event

jQuery Event Methods

Example

Alert text when a <p> element is double-clicked:

$("p").dblclick(function(){
    alert("This paragraph was double-clicked.");
});

Definition and Usage

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

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

Note: The dblclick event also generates a click event. If both events are applied to the same element, it can cause issues.


Syntax

Trigger the dblclick event for the selected elements:

Attach a function to the dblclick event:

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

jQuery Event Methods

❮ Sel Multipleattribute Equal Value Misc Makearray ❯