I think that we can stop all animations stopping all setIntervals
(with clearInterval).
function stopAllAnims(){
for(var j=0;j50;j++){clearInterval(j)}
}
Or like a extension:
$.extend({
stopAllAnims: function(){ for(var j=0;j50;j++)
{ clearInterval(j); }}
});
On Sep 2, 10:08
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 scrollTimeoutID;
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 oldPosition and
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',
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 =
5 matches
Mail list logo