Ver Mensaje Individual
  #6 (permalink)  
Antiguo 14/06/2012, 08:49
Avatar de emprear
emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 10 meses
Puntos: 1567
Respuesta: ejecutar secuencialmente el script

Tenés que hacerlo asi
Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2.    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <title>titulo</title>
  5. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  6. <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js">
  7. </head>
  8. <body id="home">
  9. <p><a href="#">Link</a></p>
  10. <div id="dial" style="width: 300px; height: 300px; background-color: cyan;"></div>
  11. <script type="text/javascript">
  12. //<![CDATA[
  13.  
  14. $('a').click(function() {
  15. if($('body').attr('id')=="home"){
  16.  
  17. $('#dial').animate({
  18. opacity: 0.25,
  19. left: '+=50',
  20. height: 'toggle'
  21. }, 3000, function() {
  22. // a ejecutar cuando termina la animación
  23. var direccion_location = "http://google.com";
  24. ordenarHome(direccion_location);
  25. });
  26.  
  27. }else{
  28. alert('El id no es home');
  29. }
  30.  
  31. });  
  32.  
  33.  
  34. function ordenarHome(u){
  35. window.location.href = u
  36. }
  37.  
  38. //]]>
  39. </body>
  40. </html>

Saludos
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.