duration → 600
easing → swing
status → "Done at 600 ms"
How It Works
Match. Same order as .fadeIn(duration, easing, complete).
Normalize.$.speed() packs them into one object.
Animate. Unpack fields into .animate().
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.