mirror of
https://github.com/jquery/jquery.git
synced 2026-02-03 23:45:02 -05:00
first tick should not occur immediatly; no tick should happen after a stop()
+ comments
This commit is contained in:
15
src/effects.js
vendored
15
src/effects.js
vendored
@@ -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);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user