From 7f1eb1c14fdf9a5d149c907df9e331cbecfa9720 Mon Sep 17 00:00:00 2001 From: John Resig Date: Fri, 13 Feb 2009 16:15:23 +0000 Subject: [PATCH] Landing a fix for a case where the animation timer wasn't getting stopped (thanks Arrix). Fixes bug #4001. --- src/fx.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fx.js b/src/fx.js index 3d00515..724e21f 100644 --- a/src/fx.js +++ b/src/fx.js @@ -285,7 +285,7 @@ jQuery.fx.prototype = { t.elem = this.elem; - if ( t() && jQuery.timers.push(t) == 1 ) { + if ( t() && jQuery.timers.push(t) && !timerId ) { timerId = setInterval(function(){ var timers = jQuery.timers; @@ -295,6 +295,7 @@ jQuery.fx.prototype = { if ( !timers.length ) { clearInterval( timerId ); + timerId = undefined; } }, 13); } -- 1.7.10.4