Did you find this useful?
Socialize it today.

jQuery Dblclick Event

Sunday, June 17, 2012

The jQuery event dblclick() method occurs when an element is double clicked. The dblclick() method triggers the dblclick event, or specifies a function to run when a dblclick event occurs. 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.



functionFunction to run when the event(s) occur

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. Try it yourself, by double-clicking the mouse icon. You can copy and edit the jQuery code using our online HTML editor.

$("#mouse").dblclick(function () {

Double-Click the mouse icon to toggle this display!

Please help us spread the word by socializing it today!

email contact us

Did you find something wrong with the information on this page? Please take a moment to report it to us so that we can continue to improve the quality of the information on this site. Click here to report an issue with this page.

Recommended Books & Training Resources

JavaScript and jQuery: The Missing Manual Professional jQuery HTML CSS and JavaScript Editor