Skip to content
Permalink
Browse files

first tick should not occur immediatly; no tick should happen after a…

… stop()

+ comments
  • Loading branch information
louisremi timmywil
louisremi authored and timmywil committed Feb 2, 2011
1 parent 15e34d1 commit c95ab2a39c178eee47ce7b1cbdffa812d7914bb6
Showing with 7 additions and 8 deletions.
  1. +7 −8 src/effects.js
@@ -363,17 +363,16 @@ jQuery.fx.prototype = {
t.elem = this.elem;

if ( t() && jQuery.timers.push(t) && !timerId ) {
if ( jQuery.support.requestAnimationFrame ) {
timerId = true;
(function raf() {
// Use requestAnimationFrame instead of setInterval if available
( timerId = jQuery.support.requestAnimationFrame ) ?
window[timerId](function raf() {
// timerId will be true as long as the animation hasn't been stopped
if (timerId) {
window[jQuery.support.requestAnimationFrame](raf);
window[timerId](raf);
fx.tick();
}
fx.tick();
})();
} else {
}):
timerId = setInterval(fx.tick, fx.interval);
}
}
},

0 comments on commit c95ab2a

Please sign in to comment.
You can’t perform that action at this time.