Javascript examples for jQuery Method and Property:dblclick
Trigger the dblclick event for the selected elements:
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("button").click(function(){ $("p").dblclick(); });//w ww . jav a 2s . c o m }); </script> </head> <body> <button>Trigger dblclick event for p element</button> <p ondblclick="console.log('dblclick event triggered')">This is a paragraph.</p> </body> </html>