aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authortimmywil <timmywillisn@gmail.com>2011-08-16 11:21:01 -0400
committertimmywil <timmywillisn@gmail.com>2011-08-16 11:21:53 -0400
commit2053d1c621e8ef65b79d6b339d7336c732ed1b82 (patch)
tree6eb5af768a418ace07fbfd3e8dc122e11be429a7 /src
parent0b8b6360127dacc36d06753bf934ff97e5973535 (diff)
downloadjquery-2053d1c621e8ef65b79d6b339d7336c732ed1b82.tar.gz
jquery-2053d1c621e8ef65b79d6b339d7336c732ed1b82.zip
Remove requestAnimationFrame support. Fixes #9381.
Diffstat (limited to 'src')
-rw-r--r--src/effects.js23
1 files changed, 3 insertions, 20 deletions
diff --git a/src/effects.js b/src/effects.js
index a7529a0f2..800917151 100644
--- a/src/effects.js
+++ b/src/effects.js
@@ -13,10 +13,7 @@ var elemdisplay = {},
// opacity animations
[ "opacity" ]
],
- fxNow,
- requestAnimationFrame = window.webkitRequestAnimationFrame ||
- window.mozRequestAnimationFrame ||
- window.oRequestAnimationFrame;
+ fxNow;
jQuery.fn.extend({
show: function( speed, easing, callback ) {
@@ -392,8 +389,7 @@ jQuery.fx.prototype = {
// Start an animation from one number to another
custom: function( from, to, unit ) {
var self = this,
- fx = jQuery.fx,
- raf;
+ fx = jQuery.fx;
this.startTime = fxNow || createFxNow();
this.start = from;
@@ -409,20 +405,7 @@ jQuery.fx.prototype = {
t.elem = this.elem;
if ( t() && jQuery.timers.push(t) && !timerId ) {
- // Use requestAnimationFrame instead of setInterval if available
- if ( requestAnimationFrame ) {
- timerId = true;
- raf = function() {
- // When timerId gets set to null at any point, this stops
- if ( timerId ) {
- requestAnimationFrame( raf );
- fx.tick();
- }
- };
- requestAnimationFrame( raf );
- } else {
- timerId = setInterval( fx.tick, fx.interval );
- }
+ timerId = setInterval( fx.tick, fx.interval );
}
},