StefiIOE

Untitled

Jun 20th, 2020
141
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.             $(".ex .hide").click(function () {
  8.                 $(this).parents(".ex").hide("slow");
  9.  
  10.             });
  11.  
  12.             });
  13.  
  14.  
  15.     </script>
  16.     <style>
  17.         div.ex
  18.         {
  19.             background-color: #1c94c4;
  20.             padding: 7px;
  21.             border: solid 1px black;
  22.         }
  23.     </style>
  24. </head>
  25. <body>
  26. <h3>Island Trading</h3>
  27. <div class="ex">
  28.     <button class="hide">Hide me! </button>
  29.     <p>Contact: Hellen Bennet<br>
  30.         Garden House Crowther Way <br>
  31.         London
  32.     </p>
  33. </div>
  34. <h3>Paris Specialities</h3>
  35. <div class="ex">
  36. <button class="hide">Hide me</button>
  37.     <p>Contact Maria Bertrand
  38.     <br>
  39.     256 Boulevard Charonne<br>
  40.         Paris
  41.     </p>
  42. </div>
  43.  
  44. </body>
  45. </html>
RAW Paste Data