Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
- <script>
- $(document).ready(function(){
- $('#piza').click(function(){
- $('#ss').hide();
- $('#ns').hide();
- $('#ps').fadeIn();
- });
- $('#salad').click(function(){
- $('#ps').hide();
- $('#ns').hide();
- $('#ss').fadeIn();
- });
- $('#noodle').click(function(){
- $('#ps').hide();
- $('#ss').hide();
- $('#ns').fadeIn();
- });
- });
- </script>
- </head>
- <body>
- <button id="piza">pizaa</button>
- <button id="salad">salad</button>
- <button id="noodle">noodle</button>
- <p id="ps">pizaa section</p>
- <p id="ss" style="display:none;">salad section</p>
- <p id="ns" style="display:none;">noodle section</p>
- </body>
- </html>
Add Comment
Please, Sign In to add comment