StefiIOE

hide and show text

Jun 20th, 2020
1,090
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.             $("#hide").click(function () {
  8.                 $("p").hide();
  9.  
  10.             });
  11.             $("#show").click(function () {
  12.                 $("p").show()
  13.  
  14.             });
  15.  
  16.         });
  17.     </script>
  18. </head>
  19. <body>
  20. <p>If you click on the button Hide, i Will disappear</p>
  21. <button id="hide">Hide</button>
  22. <button id="show">Show</button>
  23. </body>
  24. </html>
RAW Paste Data