jQuery jQuery.fx.interval Property

Beginner
5 min read
Updated: Nov 2026
3 examples
Effects

Definition

jQuery.fx.interval (since jQuery 1.4.3) is a global Number: milliseconds between animation ticks on the legacy timer path. Default is 13. It is a static property — not $el.something().

Syntax

Start with these common calls. Keep them short and readable.

jQuery
jQuery.fx.interval        // read → usually 13
jQuery.fx.interval = 50;  // write (stop all animations first)

// Ignored when requestAnimationFrame is available
// Deprecated 3.0 · Removed 4.0
CallWhat it does
jQuery.fx.intervalLearn jQuery.fx.interval: the global milliseconds between animation ticks (default 13), deprecated in 3.0 and removed in 4.0, ignored when requestAnimationFrame is available, and how to stop all animations before changing it.

Load jQuery before your script (CDN or local file), then wrap DOM work in $(function () { ... }) when needed.

Parameters

ParameterDescription
Step 1Stop every running animation: $(":animated").stop(true, true).
Step 2Assign a number of milliseconds: jQuery.fx.interval = 50.
Step 3Start new animations — they use the new tick rate on timer-only browsers.

Return Value

Return ValueDescription
Value / undefinedGetters usually return a value from the first matched element, or undefined when nothing applies.

jQuery Examples

Example 1 — Read the Default

Inspect the global value before changing anything.

jQuery
$("#read").on("click", function () {
  $("#out").text(
    "jQuery.fx.interval = " + jQuery.fx.interval + " ms" +
    "\ntypeof: " + typeof jQuery.fx.interval
  );
});
Try It Yourself

How It Works

  1. Read. Access the static property — no method call.
  2. Default. On jQuery 1.x–3.x you usually see 13.
  3. Type. It is always a Number (milliseconds).

Example 2 — Stop, Set 50, Animate, Reset to 13

Official pattern: idle the fx pipeline, change the interval, then animate.

jQuery
function stopAll() {
  $(":animated").stop(true, true);
}

$("#slow").on("click", function () {
  stopAll();
  jQuery.fx.interval = 50;
  $("#box").css({ marginLeft: 0 }).animate({ marginLeft: 200 }, 2000);
});

$("#default").on("click", function () {
  stopAll();
  jQuery.fx.interval = 13;
  $("#box").css({ marginLeft: 0 }).animate({ marginLeft: 200 }, 2000);
});
Try It Yourself

How It Works

  1. Stop. Clear running tweens so the new interval can apply.
  2. Assign. Higher ms → fewer ticks → larger jumps per tick.
  3. Animate. Same 2000 ms duration; tick density differs on timer path.

Example 3 — Mid-Run Change Does Nothing Useful

Assigning while an animation is running does not reconfigure the active timer.

jQuery
$("#go").on("click", function () {
  jQuery.fx.interval = 13;
  $("#box").stop(true, true)
    .css({ marginLeft: 0 })
    .animate({ marginLeft: 200 }, 4000);
});

$("#change-mid").on("click", function () {
  // Property updates — active tween keeps the old timer
  jQuery.fx.interval = 50;
  $("#status").text("Set to 50 mid-flight — no reconfigure yet.");
});

$("#apply").on("click", function () {
  $(":animated").stop(true, true);
  jQuery.fx.interval = 50;
  $("#status").text("Stopped all, set 50 — next animate uses it (timer path).");
});
Try It Yourself

How It Works

  1. Start. First animation registers the global timer.
  2. Assign mid-flight. The Number updates; the live timer does not.
  3. Stop. Idle the pipeline so a new timer can use the new value.

Frequently Asked Questions

jQuery.fx.interval is a global Number: the rate in milliseconds at which jQuery’s animation engine fires update ticks on the legacy timer path. It is a static property on jQuery.fx — not a method on a jQuery collection.
The default is 13 milliseconds — roughly 77 ticks per second when the timer fallback drives animations.
Yes. It was deprecated in jQuery 3.0 and removed in jQuery 4.0. Prefer requestAnimationFrame-driven animation (what modern jQuery already uses) or CSS transitions / the Web Animations API for new work.
No. When requestAnimationFrame is available, jQuery syncs updates to the browser frame loop and ignores fx.interval. The property only mattered on legacy browsers without rAF.
jQuery uses one global interval. Stop every running animation first (for example $(":animated").stop(true, true)), then change the value. A mid-flight assignment does not reconfigure the active timer.
Yes. One jQuery.fx.interval applies to every timer-based jQuery animation on the page. Use duration, easing, CSS transitions, or jQuery.fx.off for other kinds of control.

Next: jQuery.fx.off Property

Turn all jQuery animations off globally — the practical sibling to fx.interval.

jQuery.fx.off Property tutorial →

CODETOFUN NEWS

Stay Ahead in Tech

Get the latest IT news, programming updates, and technology trends directly on your phone.

Your daily dose of tech, straight to your feed.

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

10 people found this page helpful