jQuery Method How to - Use show(time) to display a tag in animation








Question

We would like to know how to use show(time) to display a tag in animation.

Answer


<html>
  <head>
    <script type="text/javascript" src='http://code.jquery.com/jquery-1.5.2.js'></script>
    <script type="text/javascript">
        $(document).ready(function(){<!--   w  w w . j a v a2s.  c o  m-->
           $("div:hidden").show(3000);
        });
    </script>
  </head>
  <body>
      <span></span>
      <div style="display:none;">Hider!</div>
      <div></div>
    </body>
</html>

The code above is rendered as follows: