jQuery jQuery.fx.interval Property

Example

Run the animation of the <div> element with fewer frames:

$("#toggle").on("click",function(){
  $("div").toggle(5000);
});
$("#interval").on("click",function(){
  jQuery.fx.interval = 500;
});

Try It Yourself

Definition and Usage

The jQuery.fx.interval property is used to change the animation running speed in milliseconds. You can manipulate this property to adjust the number of frames per second of animation.

The default value is 13 milliseconds. This property is often used to modify the number of frames per second of animation.

Reducing this value can make the animation run more smoothly in faster browsers, but this may also affect performance.

Tip:Since jQuery uses a global interval time, in order to make this property effective, the animation should not be running or all animations should be stopped first.

Note:This property is invalid in browsers that support the requestAnimationFrame property, such as Google Chrome 11.

Syntax

jQuery.fx.interval = milliseconds;
Attribute Description
milliseconds Required. Specifies the animation running speed in milliseconds. The default is 13 milliseconds.