Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <script src = "jquery-3.5.1.min.js"></script>
- <script>
- $(document).ready(function () {
- $(".ex .hide").click(function () {
- $(this).parents(".ex").hide("slow");
- });
- });
- </script>
- <style>
- div.ex
- {
- background-color: #1c94c4;
- padding: 7px;
- border: solid 1px black;
- }
- </style>
- </head>
- <body>
- <h3>Island Trading</h3>
- <div class="ex">
- <button class="hide">Hide me! </button>
- <p>Contact: Hellen Bennet<br>
- Garden House Crowther Way <br>
- London
- </p>
- </div>
- <h3>Paris Specialities</h3>
- <div class="ex">
- <button class="hide">Hide me</button>
- <p>Contact Maria Bertrand
- <br>
- 256 Boulevard Charonne<br>
- Paris
- </p>
- </div>
- </body>
- </html>
Add Comment
Please, Sign In to add comment