Achieve a mouseover effect - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:mouseover

Description

Achieve a mouseover effect

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">

      </script> 
      <script>
$(document).ready(function(){
  $(".btn1").click(function(){
    $("p").slideUp();
  });//from w  ww  .ja v  a  2s . c  o  m
  $(".btn2").click(function(){
    $("p").slideDown();
  });
});

      </script> 
   </head> 
   <body> 
      <p>This is a paragraph.</p> 
      <button class="btn1">Slide up</button> 
      <button class="btn2">Slide down</button>  
   </body>
</html>

Related Tutorials