Number. The returned object has a numeric duration.
Animate. Use that number like any other millisecond value.
Edge Cases & Pitfalls
Watch for these when building custom effect methods.
fx.off
jQuery.fx.off still wins
A perfect speed object does not animate if effects are globally disabled.
scope
Not a collection method
Call $.speed() / jQuery.speed() — not $("#el").speed().
complete
Complete is per element
Like other effects, the callback runs once per matched element — not once for the whole set.
names
Only built-in speed names are special
"slow" / "fast" map to ms. Unknown strings are not custom named speeds unless you extend jQuery.fx.speeds.
Compatibility
Browser Support
jQuery.speed() has been part of jQuery since 1.0 (extra overloads since 1.1). It works wherever your loaded jQuery version runs effects.
✓ Stable · jQuery 1.0+
jQuery.speed()
Works in every browser that runs your loaded jQuery version. Prefer a current jQuery 3.x build for modern projects.
100%With jQuery effects
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Chromium & Legacy
Full support
Internet ExplorerIE 6+ · Legacy environments
Full support
OperaAll modern versions
Full support
$.speed()Universal
Bottom line: Safe utility for plugin authors. Use it to normalize options, then animate with .animate() or your own effect method.
Analysis
Performance Notes
Approach
Cost
Best for
$.speed() once per call
Tiny
Normalizing plugin options
Many simultaneous animations
Higher
Limit concurrent tweens / respect reduced motion
Re-parsing args manually
Wasteful
Avoid — that is what $.speed() replaces
$.speed() itself is cheap. Animation cost comes from the tweens you start afterward — keep durations reasonable and avoid flooding the fx queue.
Remember
Key Takeaways
Role: normalize duration / easing / complete for custom animations.
Defaults:400 ms and "swing"; "fast"=200, "slow"=600.
Audience: plugin authors — UI code usually uses effect shorthands.
Pair with:.animate() to actually run the tween.
One line:$.speed() turns flexible animation arguments into a ready-to-use options object.
Frequently Asked Questions
jQuery.speed() returns a plain object with normalized animation options — typically duration, easing, complete, and queue — ready for .animate() or a custom plugin method. It is a static utility on jQuery, not a collection method.
When you omit values, duration defaults to 400 milliseconds and easing defaults to "swing". Speed names "slow" (600) and "fast" (200) are converted to numbers automatically.
Plugin developers creating new animation methods. Letting $.speed() handle defaults and optional parameters avoids duplicating jQuery’s argument logic. Day-to-day UI code usually calls .animate() or .fadeIn() instead, which use speed() internally.
1) jQuery.speed([duration] [, settings]) since 1.0. 2) jQuery.speed([duration] [, easing] [, complete]) since 1.1. 3) jQuery.speed(settings) since 1.1. All return the same normalized options shape.
$.speed() only normalizes options. If jQuery.fx.off is true, effects skip tweens at runtime (duration behaves like 0) even when your speed object looks correct.
Yes. Common pattern: var opt = $.speed(options); $el.animate(props, opt); — or pass opt.duration, opt.easing, and opt.complete positionally.