Tutorials References Exercises Videos Menu
Create Website Get Certified Upgrade

jQuery jQuery.fx.off Property

❮ jQuery Properties

Example

Toggle animation on and off:

$("#true").click(function(){
  jQuery.fx.off = true;
});
$("#false").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/enable all animations.

Default value is false, which allows animations to run normally. When set to true, all animation methods will be disabled, which will immediately set elements to their final state, instead of displaying an effect.

Tip: To shorten the code, it is possible to 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

❮ jQuery Properties