[jQuery] Re: animate() canceling

2007-09-03 Thread Micox
I think that we can stop all animations stopping all setIntervals (with clearInterval). function stopAllAnims(){ for(var j=0;j<50;j++){clearInterval(j)} } Or like a extension: $.extend({ stopAllAnims: function(){ for(var j=0;j<50;j++) { clearInterval(j); }} }); On Sep 2, 10:08

[jQuery] Re: animate() canceling

2007-09-02 Thread emi polak
Hey Eric, that works like a charm. Thank you so much! Emi Polak On 9/2/07, Erik Beeson <[EMAIL PROTECTED]> wrote: > > In fact, if you find yourself wanting to do a lot of stuff when scrolling > has stopped, you could add an event for it (again, untested): > > (function($) { >var scrollTimeout

[jQuery] Re: animate() canceling

2007-09-01 Thread Erik Beeson
In fact, if you find yourself wanting to do a lot of stuff when scrolling has stopped, you could add an event for it (again, untested): (function($) { var scrollTimeoutID; $(window).bind('scroll', function() { clearTimeout(scrollTimeoutID); scrollTimeoutID = setTimeout(function()

[jQuery] Re: animate() canceling

2007-09-01 Thread Erik Beeson
Approaching the problem a different way, how about only firing the animation if scrolling has paused for a moment? Maybe something like (untested): $(document).ready(function() { var scrollTimeoutID; var topOffset = 100; $("#label").css('top', topOffset + "px"); $(window).bind('scroll',

[jQuery] Re: animate() canceling

2007-09-01 Thread emi polak
no luck heh? :( On 9/1/07, emi polak <[EMAIL PROTECTED]> wrote: > > Hi, > I am altering the "top" property of a floating label in a webpage. The > "top" adjustement is fired at page scroll, so that the label would always > stay in its place. > Now I would like to animate the label between its oldP