Slide animation : slideToggle « jQuery « JavaScript Tutorial






<html>
  <head>
    <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
    <script type="text/javascript">
  $(document).ready(function(){
    function animateIt() {
      $("#mover").slideToggle("slow", animateIt);
    }
    animateIt();

  });
    </script>
 <style>
  div { background:yellow; width:80px; height:80px; margin:5px; float:left; }
  </style>

  </head>
  <body>
  <div></div>
  <div id="mover"></div>
  <div></div>





  </body>
</html>








30.100.slideToggle
30.100.1.Slide animation
30.100.2.Slide toggle and function
30.100.3.Slide toggle button
30.100.4.Slide toggle callback
30.100.5.Fast slide toggle
30.100.6.Slide toggle in milliseconds
30.100.7.Slide toggle slow
30.100.8.slideToggle(speed, callback): height is adjusted