Skip to content

Commit 7f1eb1c

Browse files
committed
Landing a fix for a case where the animation timer wasn't getting stopped (thanks Arrix). Fixes bug jquery#4001.
1 parent 831b15b commit 7f1eb1c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/fx.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ jQuery.fx.prototype = {
285285

286286
t.elem = this.elem;
287287

288-
if ( t() && jQuery.timers.push(t) == 1 ) {
288+
if ( t() && jQuery.timers.push(t) && !timerId ) {
289289
timerId = setInterval(function(){
290290
var timers = jQuery.timers;
291291

@@ -295,6 +295,7 @@ jQuery.fx.prototype = {
295295

296296
if ( !timers.length ) {
297297
clearInterval( timerId );
298+
timerId = undefined;
298299
}
299300
}, 13);
300301
}

0 commit comments

Comments
 (0)