jQuery jQuery.fx.offProperty
Examples
Toggle animation switch:
$("#disable").click(function(){
jQuery.fx.off = true;
});
$("#enable").click(function(){
jQuery.fx.off = false;
});
$("#toggle").click(function(){
$("div").toggle("slow");
});
jQuery.fx.off = true;
});
$("#enable").click(function(){
jQuery.fx.off = false;
});
$("#toggle").click(function(){
$("div").toggle("slow");
});
Try it Yourself »
Definition and Usage
The jQuery.fx.off property is used to globally disable or enable all animations.
The default value is false, which allows animations to run normally. When set to true, all animation methods will be disabled, which will set elements to their final state instead of showing effects.
Tip:To simplify the code, you can use $.fx.off instead of jQuery.fx.off.
Syntax
jQuery.fx.off = true|false;
| Parameter | Description |
|---|---|
| true | Specifies that animations should be disabled. |
| false | Default. Specifies that animations should be enabled. |
Other Extensions
jQuery Properties