Pietro Vieira (Tecnologia e informação)

Publicado por: pietrobr em: Maio 29, 2008

SlideUP em JQuery

Source: jquery-latest

<html>
<head>
  <script src=”jquery-latest.js“></script>
 
  <script>
  $(document).ready(function(){
   
    $(document.body).click(function () {
      if ($(“div:first”).is(“:hidden”)) {
        $(“div”).show(“slow”);
      } else {
        $(“div”).slideUp();
      }
    });

  });
  </script>
  <style>
  div { background:#3d9a44; margin:3px; width:80px;
        height:40px; float:left; }
  </style>
</head>
<body>
  Click me!
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
</body>
</html>

Deixe uma resposta