Slide to show para : slideDown « jQuery « JavaScript DHTML






Slide to show para

    


<html>
  <head>
    <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
           $("div").one('click', function () {
              if ($(this).is(":first-child")) {
                $("p").text("It's the first div.");
              }else{
                $("p").text("It's NOT the first div.");
              }
              $("p").hide().slideDown("slow");
              
           });
        });
    </script>
     <style>
     div { border:2px white solid;}
  </style>

  </head>
  <body>
    <body>
      Press each to see the text.
      <div>asdf</div>
      <div>asdf</div>
      <div>asdf</div>
      <div>asdf</div>
      <div>asdf</div>
      <div>asdf</div>
      <p></p>
  </body>
</html>

   
    
    
    
  








Related examples in the same category

1.Hide and Slide down
2.Slide down and set focus
3.Slide down fast
4.Slide down form fields
5.Slide down in milliseconds
6.Slide down slowly
7.slideDown(speed, callback): Only the height is adjusted for this animation