Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery jQuery.fx.off Property

jQuery jQuery.fx.off Property

jQuery Properties jQuery Properties

Example

Toggle animations on or off:

$("#disable").click(function(){

    jQuery.fx.off = true;

});

$("#enable").click(function(){

    jQuery.fx.off = false;

});

$("#toggle").click(function(){

    $("div").toggle("slow");

});

Try it »


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 are disabled, which sets elements to their final state instead of showing the effect.

**Tip:** To simplify your code, you can use $.fx.off instead of jQuery.fx.off.


Syntax

jQuery.fx.off = true|false;

Parameters Description
true Specifies that animations should be disabled.
false Default. Specifies that animations should be enabled.

jQuery Properties jQuery Properties