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: Create Quiz Comment V vkash8574 Follow 0 Improve V vkash8574 Follow 0 Improve Article Tags : Web Technologies JQuery jQuery-Questions Explore jQuery Tutorial 7 min read Getting Started with jQuery 4 min read jQuery Introduction 7 min read jQuery Syntax 2 min read jQuery CDN 4 min read jQuery SelectorsJQuery Selectors 5 min read jQuery * Selector 1 min read jQuery #id Selector 1 min read jQuery .class Selector 1 min read jQuery EventsjQuery Events 4 min read jQuery bind() Method 2 min read jQuery blur() Method 1 min read jQuery change() Method 2 min read jQuery EffectsjQuery animate() Method 2 min read jQuery clearQueue() Method 2 min read jQuery delay() Method 2 min read jQuery HTML/CSSjQuery addClass() Method 2 min read jQuery after() Method 1 min read jQuery append() Method 2 min read jQuery TraversingjQuery | Traversing 4 min read jQuery add() method 1 min read jQuery addBack() Method 2 min read Like