jQuery | dblclick() with Examples
The dblclick() is an inbuilt method in jQuery which is used to trigger the double-click event to occur. This method occurs when the selected element will be double clicked.
Here “selector” is the selected element.
Parameter: It accepts an optional parameter “args” which specifies a function that do a specific task after double clicking.
Return Value: It returns some function when the selected element is double-clicked.
In the below code, no function is passed to this method.
Before double clicking the “Click me to trigger dblclick event” button-
After double clicking the “Click me to trigger dblclick event” button-
In the below code, function is passed to dblclick() method.
Before double clicking the “Click Me” button-
After double clicking the “Click Me” button-