Problems with animate() in on eventhandler

Problems with animate() in on eventhandler

Hey jQ community,

I've got a little problem with an animate() function.
  1. myItem.animate({top:'-=' + oldTop, left:'-=' + oldLeft}, 3000, function(){
  2.   alert("afterAnimate");
  3.  });
This code is part of an on (click) function.
But after clicking the animation starts after 3 seconds and don't run 3 seconds but 5 and
the afterAnimate alert appears after 3 seconds with the start of the animation.
Why? Whats wrong? (I use jQuery 1.8.3 not 1.9.0)

Thanks, Pete








    • Topic Participants

    • pete