You should note that it is not recommended to apply the click and dblclick event to the same element. If both are applied, unexpected results can occur.

Syntax

Basic Example

In the following jQuery example, the dblclick() method specifies that a function should run when the click event occurs. In this example, the div element will be shown or hidden as the mouse icon is double-clicked. You can copy and edit the jQuery code using our online HTML editor.