I know the frame rate in jQuery could be set through jQuery.fx.interval
.
However, it applies to all the jQuery internal animate function such as slideDown
, fadeIn
and animate
etc.
I want to set frame rate for each animate()
, how could I archieve that?
From the API documentation page:
Since jQuery uses one global interval, no animation should be running or all animations should stop for the change of this property to take effect.
Note:
jQuery.fx.interval
currently has no effect in browsers that support the requestAnimationFrame property, such as Google Chrome 11. This behavior is subject to change in a future release.
I take from this that you cannot set the frame rate for an individual animate
call, unless you were willing to have no animations until that one had completed, and even then you can't guarantee the behaviour. It's probably best to leave the setting alone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With