.slideDown() (since jQuery 1.0) displays matched elements with a sliding motion by animating height from 0 to full size. Content below shifts down to make room. Returns the jQuery object for chaining.
Syntax
Start with these common calls. Keep them short and readable.
jQuery
$("#panel").hide(); // start hidden
$("#panel").slideDown(); // default 400 ms
$("#panel").slideDown("slow"); // 600 ms
$("#panel").slideDown(600, "linear", function () { /* done */ });
// Hidden → height grows → fully visible
// Content below slides down as height increases
Call
What it does
.slideDown()
Learn jQuery .slideDown(): reveal hidden elements with a sliding height animation since 1.0, duration presets, easing since 1.4.3, per-element callbacks, and compare with slideUp, show, fadeIn, and slideToggle.
Load jQuery before your script (CDN or local file), then wrap DOM work in $(function () { ... }) when needed.
Parameters
Parameter
Description
Step 1
Start with a hidden element (.hide() or display: none).
Step 2
On a user action, call .slideDown() (optional duration / easing / complete).
Step 3
jQuery restores display and animates height from 0 to natural size.
Return Value
Return Value
Description
Value / undefined
Getters usually return a value from the first matched element, or undefined when nothing applies.
jQuery Examples
Example 1 — Slow Reveal on Click
Official pattern: element starts hidden; click slides it down over 600 ms.
jQuery
$("#clickme").on("click", function () {
$("#book").slideDown("slow", function () {
// Animation complete.
});
});
Click 1 → all boxes slideDown("slow")
Click 2 → all boxes .hide() instantly
Repeats based on :hidden check
How It Works
Check.:hidden on the first box picks the branch.
Reveal. Hidden → .slideDown("slow") on all boxes.
Hide. Visible → .hide() with no animation.
Example 3 — slideDown with Per-Element Callback
Official idea: after each input finishes sliding, style it and focus the middle one.
jQuery
$("#push").on("click", function () {
$("input").slideDown(1000, function () {
$(this).attr("data-ready", "yes");
$(this).filter(".middle").trigger("focus");
$("#status").text("Slide finished for one input.");
});
});
Inputs slide down over 1000 ms
Callback runs once per input
.middle input receives focus when its slide ends
How It Works
Duration.1000 is one second in milliseconds.
Per element. Three inputs → callback can run three times.
this. Inside complete, this is the current input.
Frequently Asked Questions
.slideDown() displays matched elements with a sliding motion by animating height from zero to full size. Content below shifts down to make room. Use it for a vertical expand reveal instead of an instant .show().
1) .slideDown([duration] [, complete]) — optional duration and completion callback. 2) .slideDown(options) — an options object with duration, easing, queue, step, progress, and Promise-style callbacks. 3) .slideDown([duration] [, easing] [, complete]) — positional easing since jQuery 1.4.3.
.slideUp() collapses visible elements. .show() reveals instantly with no transition. .fadeIn() animates opacity, not height. .slideToggle() picks slideDown or slideUp from current visibility. .slideDown() only expands and shows.
Milliseconds, or the strings "fast" (200 ms) and "slow" (600 ms). Default is 400 ms when omitted.
Once per matched element when that element’s slide finishes — not once for the whole set. Use .promise().done() when you need a single callback after every element completes.
Yes. Start with display:none (or .hide()). Calling .slideDown() on already-visible elements has little effect because they are already expanded and shown.