Ver Mensaje Individual
  #4 (permalink)  
Antiguo 08/12/2011, 09:53
Avatar de chicohot20
chicohot20
 
Fecha de Ingreso: mayo-2009
Mensajes: 388
Antigüedad: 15 años
Puntos: 43
Respuesta: Problemas con animate de jQuery

Código HTML:
Ver original
  1. <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" xml:lang="es" lang="es">
  2. <head>
  3.     <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
  4.     <script type="text/javascript">
  5.     <!--
  6.        $(document).ready(function(){
  7.            //Sesiones
  8.            $('#registro').click(function(){
  9.                $(this).animate({
  10.                    top: "0px"
  11.                }, 1000);
  12.            });
  13.            $('#registro').hover(function(){
  14.             },function(){
  15.                $(this).stop(true).animate({
  16.                    top: "-55px"
  17.                }, 600);
  18.            });
  19.        });
  20.    //-->
  21.     </script>
  22. </head>
  23. <body style="margin:0;">
  24.     <div style="background:#333;height:200px;width:600px;">
  25.         <div id="registro" style="position:absolute;top:-55px;left:50px;width:177px;height:70px;z-index:9999;background:#FFF;">
  26.             <p>Hola</p>
  27.         </div>
  28.     </div>
  29. </body>
  30. </html>
Lee la documentacion:

http://api.jquery.com/hover/
http://api.jquery.com/stop/