jagata

example

Oct 28th, 2020
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.81 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
  5. <script>
  6. $(document).ready(function(){
  7.  
  8.   $('#piza').click(function(){
  9.  
  10.       $('#ss').hide();
  11.       $('#ns').hide();
  12.       $('#ps').fadeIn();
  13.   });
  14.    $('#salad').click(function(){
  15.  
  16.       $('#ps').hide();
  17.       $('#ns').hide();
  18.       $('#ss').fadeIn();
  19.   });
  20.    $('#noodle').click(function(){
  21.  
  22.       $('#ps').hide();
  23.       $('#ss').hide();
  24.       $('#ns').fadeIn();
  25.   });
  26.  
  27. });
  28. </script>
  29. </head>
  30. <body>
  31.  
  32.  
  33.  
  34. <button id="piza">pizaa</button>
  35. <button id="salad">salad</button>
  36. <button id="noodle">noodle</button>
  37.  
  38. <p id="ps">pizaa section</p>
  39. <p id="ss" style="display:none;">salad section</p>
  40. <p id="ns" style="display:none;">noodle section</p>
  41. </body>
  42. </html>
  43.  
Add Comment
Please, Sign In to add comment