Javascript examples for jQuery:Mouse Event
Double-click a <p> element to hide it
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("p").dblclick(function(){ $(this).hide();// www.j av a2s .c o m }); }); </script> </head> <body> <p>If you double-click on me, I will disappear.</p> <p>Click me away!</p> <p>Click me too!</p> </body> </html>