Ver Mensaje Individual
  #6 (permalink)  
Antiguo 27/10/2010, 14:38
Dany_s
 
Fecha de Ingreso: diciembre-2009
Ubicación: Misiones
Mensajes: 867
Antigüedad: 14 años, 5 meses
Puntos: 65
Respuesta: boton con animacion fade en jquery

con un stop, para que detenga la animación cuando se lanza el evento al entrar o al salir

Código HTML:
Ver original
  1.     <title>Pruebas</title>
  2. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
  3. $(function(){
  4.  
  5.     $("#boton").fadeTo("slow", 1.0);
  6.    
  7.     $("#boton a").hover(function(){
  8.         $(this).stop().fadeTo("slow", 0.0);
  9.     },function(){
  10.         $(this).stop().fadeTo("slow", 1.0);
  11.     });
  12.  
  13. });
  14. <style type="text/css">
  15. a{color: blue; font-size: 20px}
  16. </head>
  17.     <div id="boton"><a href="#">Fade</a> </div>
  18. </body>
  19. </html>