ahmed0saber

Hover effect using jQuery in HTML JS

Jun 19th, 2021
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2.   <head>
  3.     <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
  4.     <script>
  5.     $(document).ready(function(){
  6.     $("button").hover(function(){
  7.     $("p").hide();
  8.     },
  9.     function(){
  10.     $("p").show();
  11.     });
  12.     });
  13.     </script>
  14.   </head>
  15.   <body>
  16.     <button>Hover on me</button>
  17.     <p>Hello Saber</p>
  18.   </body>
  19. </html>
Advertisement
Add Comment
Please, Sign In to add comment