English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The jQuery.fx.off property is used to globally disable/Enable all animations.
When this property is set totrue, all animation methods will set the element to its final state immediately when called, without displaying the effect.
By setting the property tofalseAnimation can be re-enabled.
To shorten the code, use $ .fx.off instead of jQuery.fx.off.
jQuery.fx.off = true|false
Enable and disable animation:
$("#true").click(function(){ $.fx.off = true; }); $("#false").click(function(){ $.fx.off = false; }); $("#run").click(function(){ $("div").toggle("slow"); });Test and see‹/›
Value | Description |
---|---|
true | Specify that animation should be disabled |
false | Specify that animation should be enabled. This is the default value |