VOOZH about

URL: https://www.geeksforgeeks.org/jquery/how-to-disable-jquery-animation/

⇱ How to disable jQuery animation ? - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

How to disable jQuery animation ?

Last Updated : 23 Jul, 2025

In this article, we will see how to disable the animation effect using jQuery. To disable the animation effect, we use jQuery.fx.off property.

The jQuery.fx.off property is used to globally enable/disable all animations of a page. Its default value is false which is used to allow animation to run normally.

Syntax:

jQuery.fx.off = true|false;

Property Values: 

  • true: It is used to specify that the animations should be disabled.
  • false: It is used to specifies that the animations should be enabled.
 

Approach: Here, first we will use div element to create a square box of size 100px. After creating the box, we use toggle() method to set the toggle animation on the <div> element. Also, we use jQuery.fx.off property to disable the toggle animation effect.

Example:

Output:

👁 Image
Comment

Explore