English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

jQuery.fx.off property

jQuery Properties

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.

Syntax:

jQuery.fx.off = true|false

Example

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‹/›

Property Value

ValueDescription
trueSpecify that animation should be disabled
falseSpecify that animation should be enabled. This is the default value

jQuery Properties