Advertisement
StefiIOE

removing text on double click

Jun 20th, 2020
1,066
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <script src = "jquery-3.5.1.min.js"></script>
  5.     <script>
  6.         $(document).ready(function () {
  7.             $("p").dblclick(function () {
  8.                 $(this).hide();
  9.  
  10.             });
  11.  
  12.         });
  13.       </script>
  14. </head>
  15. <body>
  16. <p>If you double-click on me i will disappear.</p>
  17. <p>Me 2.</p>
  18. <p>Dont forget me.</p>
  19. </body>
  20. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement