jQuery jQuery.fx.interval Attribute
Example
Toggle animation switch:
$("#true").click(function(){ jQuery.fx.off = true; }); $("#false").click(function(){ jQuery.fx.off = false; }); $("#toggle").click(function(){ $("div").toggle("slow"); });
Definition and Usage
The jQuery.fx.off property is used to globally enable or disable all animations.
The default value is false, which allows animations to run normally. When set to true, all animation methods will be disabled, setting the element to its last state instead of displaying the effect.
Tip:To simplify the code, you can use $.fx.off instead of jQuery.fx.off.
Syntax
jQuery.fx.off = true|false;
Attribute | Description |
---|---|
true | Specifies that animation should be disabled. |
false | Default. Specifies that animation should be enabled. |