Closed dbeard closed 13 years ago
Thinking about this more - there's a bigger problem here I think. There is no way to run a css transition and traditional animation at the same time. The example I've used for testing:
$("div").click(function(){
$this = $(this);
targetTop = 300;
if(parseFloat($this.css('top')) > 0)
targetTop = 0;
$this.animate({top:targetTop},{duration:500});
$({test:0}).animate({test:100},{complete:function(){
console.log("Object animation complete")
}});
});
If I run this, the first "css" transition stops and/or completes immediately since the second animate function on the non-DOM object causes the tick to fire and stops it.
hmm, this is worth investigating
So, I've actually gone through the code, and it looks like the main problem was that the base of your code seems to be based off of an older version of jquery. I was using the newest 1.6.1 release, and while it generally appears to work on the surface, there are definitely some problems as described above. The new version has some key changes that is causing issues. I have gone through and merged the changes into your code, and it all appears to be working correctly now. I will fork and do a pull request for you to look at it
Thanks, I am aware of the changes that happened in jQuery but just never took the time to rewrite the plugin based on the newest version.
pushing a solution, tell me if that solves your problem
After doing an animation using the traditional animation function (In my case, I was using a non-DOM object), the tick timer continues to run continually. This causes css transitions to halt as soon as the next tick hits (pretty much instantaneously).
I've been able to fix it by adding:
inside the if(done) statement in the custom function. I can do a pull request if you would like.