jQuery fx.off Property

Last Updated:

jQuery fx.off Property

The jQuery fx.off property globally disable all animations.

Example

HTML Editor
<!DOCTYPE html> <html lang="en-US"> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> </head> <body> <h1>jQuery fx.off</h1> <button id="mySlideToggle">slideToggle</button> <button id="myAnimationOff">animation off</button> <button id="myAnimationOn">animation on</button> <script> $(document).ready(function(){ $("#mySlideToggle").click(function(){ $("p").slideToggle("1500"); }); $("#myAnimationOff").click(function(){ jQuery.fx.off = true; }); $("#myAnimationOn").click(function(){ jQuery.fx.off = false; }); }); </script> </body> </html>

Syntax

jQuery.fx.off = bool;

Parameter Values

Value Type Explanation
bool Required Specifies that animations should be disabled.
Possible values are
  • true - Disable all
  • false - Enable all
By Default, jQuery.fx.off is false

Browser Support

Devicedesktopmobile
Browsergoogle chromesafarifirefoxinternet Exploreredgeoperagoogle chromesafarifirefoxedgeoperaandroid webviewsamsung internet
fx.offYesYesYesYesYesYesYesYesYesYesYesYesYes

Share this Page

Meet the Author