jQuery dblclick() Event

jQuery dblclick is a mouse event that triggers when an element is double-clicked by the mouse pointer.

Syntax:

$(selector).dblclick(args);

Example: In this example, we are using dblclick() event.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <script src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js">
    </script>
  
    <!-- jQuery code to show the working of this method -->
    <script>
        $(document).ready(function () {
            $("p").dblclick();
        });
    </script>
  
    <style>
        p {
            display: block;
            width: 300px;
            padding: 20px;
            font-size: 30px;
            border: 2px solid green;
        }
    </style>
</head>
  
<body>
    <center>
        <!-- click on this method -->
        <p onclick="alert('dblclick event has trigged')">
            w3wiki.
        </p>
    </center>
  
</body>
  
</html>


Output

jQuery Events

jQuery events are actions or occurrences that happen on a web page, such as clicks, hover, or keypress. jQuery provides methods to handle and respond to these events with ease.  jQuery events are used to create dynamic web pages.

Syntax:

$(selector).method(function)

Here We will explore some basic events along with their basic implementation of examples.

Similar Reads

jQuery click() Event

jQuery click is a mouse event that triggers when an element is clicked by the mouse pointer....

jQuery dblclick() Event

...

jQuery mouseenter() and mouseleave() Events

jQuery dblclick is a mouse event that triggers when an element is double-clicked by the mouse pointer....

jQuery Mouse events

...

jQuery Keyboard Events

jQuery mouseenter is a mouse event that triggers when the mouse pointer enters an element, and mouseleave is a mouse event that triggers when the mouse pointer leaves an element....

jQuery Document/ Window Events

...

jQuery Form Event

jQuery Mouse events handle interactions with the mouse, like click, hover, dblclick. Use on() method to bind event handlers....

Contact Us