How to run a code on double-click event in jQuery ? Last Updated : 17 Mar, 2021 Comments Improve Suggest changes Like Article Like Report In this article, we will see how to run a code after double clicked the element using jQuery. To run the code on double clicked we use dblclick() method. This method is used to trigger the double-click event to occur. This method occurs when the selected element will be double clicked. Syntax: $(selector).dblclick(args); Parameter: It accepts an optional parameter “args” which specifies a function that do a specific task after double clicking. Example: HTML <!DOCTYpe html> <html> <head> <title> How to run a code on double-click event in jQuery? </title> <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 () { $("body").css("text-align", "center"); $("h1").css("color", "green"); $("p").dblclick(function () { $(this).css("font-size", "20px"); $(this).css("color", "green"); }); }); </script> </head> <body> <h1>GeeksforGeeks</h1> <h3> How to run a code on double-click event in jQuery? </h3> <p> GeeksforGeeks: A computer science portal </p> </body> </html> Output: Comment More infoAdvertise with us Next Article How to run a code on double-click event in jQuery ? V vkash8574 Follow Improve Article Tags : Web Technologies JQuery jQuery-Questions Similar Reads How to run a code on click event in jQuery ? In this article, we will see how to run the code after clicking on an event. To run the code after clicking an event, we use the click() method. The click() method is used to run the code when a click event occurs. The click() method to attach a click event handler to selected elements. Inside the h 1 min read How to run a code on document ready event in jQuery ? In this article, we will see how to run a code when a page loads using jQuery. To run a code at page load time, we will use the ready() method. This method helps to load the whole page and then execute the rest code. This method specifies the function to execute when the DOM is fully loaded. Syntax: 1 min read How to run a code on mouseenter event in jQuery ? In this article, we will see how to run the code when the mouse enters into the specific area using jQuery. To run the code on a mouse enter a specific area, mouseenter() method is used. The mouseenter() method works when the mouse pointer moves over the selected element. Syntax: $(selector).mouseen 1 min read How to add dbclick() on right click in jQuery? The jQuery dblclick() method is used to detect whenever a particular element is double-clicked. This method only detects left mouse button double clicks and not the right mouse button double clicks. In this article, we will see how to simulate the double right mouse click in jQuery. Approach: There 3 min read How to Double click on a div element to toggle background color in jQuery ? In this article, we will see how to make a double click event on a paragraph element to toggle background color in jQuery. To toggle the background color of a div element on double-click, toggleClass() method is used. The toggleClass() method is used to toggle or change the class which attached with 1 min read Like