t.elem = this.elem;
if ( t() && jQuery.timers.push(t) && !timerId ) {
- timerId = setInterval(fx.tick, fx.interval);
+ jQuery.support.requestAnimationFrame ?
+ window[jQuery.support.requestAnimationFrame](fx.tick):
+ timerId = setInterval(fx.tick, fx.interval);
}
},
if ( !timers.length ) {
jQuery.fx.stop();
+ } else if ( jQuery.support.requestAnimationFrame ) {
+ window[jQuery.support.requestAnimationFrame](this);
}
},
// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
optSelected: opt.selected,
+ // Verify requestAnimationFrame mechanism existence
+ // use the prefixed name as the value
+ requestAnimationFrame: mozRequestAnimationFrame ?
+ 'mozRequestAnimationFrame' :
+ webkitRequestAnimationFrame ?
+ 'webkitRequestAnimationFrame' :
+ false,
+
// Will be defined later
deleteExpando: true,
optDisabled: false,