<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Executing a Function on Double-click Event in jQuery</title> <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> <style> p{ padding: 15px; font: 21px sans-serif; background: blue; } </style> <script> $(document).ready(function(){ $("p").dblclick(function(){ $(this).slideUp(); }); }); </script> </head> <body> <p>Double Click On Me. I will disappear slowly.</p> <p>Double Click On Me. I will disappear slowly.</p> </body> </html>