Globally disable all animations.
overridable Clears up the setInterval
Calls .run()
on each object in the jQuery.timers
array, removing it from the array if .run()
returns a falsy value. Calls jQuery.fx.stop()
whenever there are no timers remaining.
overridable Creates a setInterval
if one doesn't already exist, and pushes tickFunction
to the jQuery.timers
array. tickFunction
should also have anim
, elem
, and queue
properties that reference the animation object, animated element, and queue option to facilitate jQuery.fn.stop()
By overriding fx.timer
and fx.stop
you should be able to implement any animation tick behaviour you desire. (like using requestAnimationFrame
instead of setTimeout
.)
There is an example of overriding the timer loop in `jquery.requestAnimationFrame`
The rate (in milliseconds) at which animations fire.
``
1.4.3
Deprecated since 3.0. See ``.
Cause: As of jQuery 3.0 the
jQuery.fx.interval
property can be used to change the animation interval only on browsers that do not support thewindow.requestAnimationFrame()
method. That is currently only Internet Explorer 9 and the Android Browser. Once support is dropped for these browsers, the property will serve no purpose and it will be removed.Solution: Find and remove code that changes or uses
jQuery.fx.interval
. If the value is being used by code in your page or a plugin, the code may be making assumptions that are no longer valid. The default value ofjQuery.fx.interval
is13
(milliseconds), which could be used instead of accessing this property. ````Cause all animations to run with less frames.
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery.fx.interval demo</title> <style> div { width: 50px; height: 30px; margin: 5px; float: left; background: green; } </style> <script src="https://code.jquery.com/jquery-3.3.1.js"></script> </head> <body> <p><input type="button" value="Run"></p> <div></div> <script> jQuery.fx.interval = 100; $( "input" ).click(function() { $( "div" ).toggle( 3000 ); }); </script> </body> </html>