Ver Mensaje Individual
  #7 (permalink)  
Antiguo 10/08/2010, 05:27
Dany_s
 
Fecha de Ingreso: diciembre-2009
Ubicación: Misiones
Mensajes: 867
Antigüedad: 14 años, 5 meses
Puntos: 65
Respuesta: dos dudas con JQUERY

no se muy bien lo que queres lograr pero aca te paso algo

Código HTML:
Ver original
  1. <title>Prueba</title>
  2. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
  3. $( function (){
  4.  
  5.   $(".titulo").toggle(function(){
  6.       $(this).closest('.contenedor').find('.cuerpo').animate({
  7.         width: "200px",
  8.       }, 1500 );
  9.   }, function(){
  10.       $(this).closest('.contenedor').find('.cuerpo').animate({
  11.         width: "0px"
  12.       }, 1500 );
  13.   });
  14.  
  15. });
  16.  
  17.     .titulo, .cuerpo {float:left}
  18.     .cuerpo{overflow:hidden; width:0px; height:200px; background:red}
  19.     .clear{clear:both}
  20. </head>
  21.     <div class="contenedor">
  22.         <div class="titulo">Titulo 1</div>
  23.         <div class="cuerpo">asd</div>
  24.     </div>
  25.     <div class="clear"></div>
  26.      <div class="contenedor">
  27.         <div class="titulo">Titulo 2</div>
  28.         <div class="cuerpo">asd 2</div>
  29.     </div>
  30. </body>
  31. </html>