jQuery .slideDown() Method

Beginner
6 min read
Updated: Oct 2026
5 examples
Live preview

What Is .slideDown()?

.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.

Remember
$("#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
NeedUse
Vertical expand reveal$el.slideDown()
Vertical collapse.slideUp()
Toggle slide direction.slideToggle()
Opacity reveal.fadeIn()
Instant show.show()

How to Use .slideDown()

Hide the element first, then call .slideDown() from a click (or other) handler.

  1. Start with a hidden element (.hide() or display: none).
  2. On a user action, call .slideDown() (optional duration / easing / complete).
  3. jQuery restores display and animates height from 0 to natural size.
  4. Lower page content shifts down as the element expands.
  5. Optional complete runs once per matched element when done.
PieceRequired?Role
Matched setYesElements to reveal (should be hidden)
durationNoDefault 400; also "fast" / "slow"
easingNoSince 1.4.3 — swing (default) or linear
completeNoOnce per element when its slide ends
Return value—jQuery object (chainable)

Pseudocode

Pseudocode
call $(elements).slideDown(duration?, easing?, complete?)

for each matched element:
    if already visible:
        little or no change
    else:
        restore display
        animate height from 0 → natural height
        content below shifts down

    if complete was provided:
        call complete once for this element
        (this = the DOM element)

return the jQuery set for chaining

Cheat Sheet

Keep these facts handy while building slide reveals.

TopicDetail
Syntax.slideDown([duration] [, easing] [, complete])
Options form.slideDown({ duration, easing, complete, … })
SincejQuery 1.0 (easing arg since 1.4.3)
Default duration400 ms
Presets"fast" = 200 · "slow" = 600
Easingswing (default) · linear
Start stateElement should be hidden first
Related.slideUp() · .slideToggle()

Live Preview

Hide the panel, then slideDown with a chosen duration.

Panel content — slide me open after hiding.

Hide first, then Run a slideDown. Content below shifts as height grows.

Result
Ready — hide, then slideDown.

jQuery Examples

Short, copy-ready snippets. Open DevTools, or use Try It Yourself for a live editor.

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.
  });
});
Try It Yourself

How It Works

  1. Hidden start. The target begins with display: none.
  2. Preset. "slow" means 600 ms.
  3. Tween. Height animates from 0 to natural size.
  4. Callback. Runs once for that element when done.

Example 2 — slideDown or .hide() (Official Ex. 1)

If the first box is hidden, slide all down; otherwise hide them instantly.

jQuery
$("#toggle").on("click", function () {
  if ($(".box").first().is(":hidden")) {
    $(".box").slideDown("slow");
  } else {
    $(".box").hide();
  }
});
Try It Yourself

How It Works

  1. Check. :hidden on the first box picks the branch.
  2. Reveal. Hidden → .slideDown("slow") on all boxes.
  3. Hide. Visible → .hide() with no animation.
  4. Note. For animated both ways, prefer .slideToggle().

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.");
  });
});
Try It Yourself

How It Works

  1. Duration. 1000 is one second in milliseconds.
  2. Per element. Three inputs → callback can run three times.
  3. this. Inside complete, this is the current input.
  4. Focus. Filter .middle and trigger focus after its slide.

Example 4 — Default 400 ms Panel

Omit duration to use the default timing.

jQuery
$("#panel-btn").on("click", function () {
  $("#panel").slideDown();
});
Try It Yourself

How It Works

  1. Omit args. No duration → default 400 ms.
  2. Hidden. Panel starts with .hide() or CSS none.
  3. Click. One call expands height smoothly.
  4. Layout. Content below moves down during the tween.

Example 5 — Linear Easing (Since 1.4.3)

Three-argument form: duration, easing, complete.

jQuery
$("#reveal").on("click", function () {
  $("#drawer").slideDown(600, "linear", function () {
    $(this).text("Slide complete at constant speed");
  });
});
Try It Yourself

How It Works

  1. Duration. 600 ms total.
  2. Easing. "linear" keeps a constant rate (vs swing).
  3. Complete. Updates text when the drawer is fully open.
  4. Since. Positional easing needs jQuery 1.4.3+.

Edge Cases & Pitfalls

Watch these when a slide reveal looks wrong.

hidden

Must start hidden

Call .hide() first (or use CSS display: none). Already-visible elements barely change.

callback

Complete runs once per element

Three panels → up to three callbacks. Use .promise().done() for one “all done” hook.

queue

Spam clicks queue slides

Use .stop(true, true) before .slideDown() on busy buttons.

fx.off

jQuery.fx.off skips the tween

When true, the panel snaps open instantly (duration 0).

toggle

Need open and close animated?

Use .slideToggle() instead of slideDown + hide.

Browser Support

.slideDown() has been part of jQuery since 1.0 (positional easing since 1.4.3). It works in every browser that runs your loaded jQuery version — no separate browser feature flag.

✓ Stable · jQuery 1.0+

jQuery .slideDown()

Supported across jQuery 1.x, 2.x, and 3.x. Prefer a current jQuery 3.x build. Height animation uses jQuery’s fx engine.

100% With jQuery
Google Chrome All versions · Desktop & Mobile
Full support
Mozilla Firefox All versions · Desktop & Mobile
Full support
Apple Safari All versions · macOS & iOS
Full support
Microsoft Edge All versions · Chromium & Legacy
Full support
Internet Explorer IE 6+ · Legacy environments
Full support
Opera All modern versions
Full support
.slideDown() Universal

Bottom line: Safe for panels, FAQs, and menus. Hide first, pick a duration, and guard rapid clicks with .stop(true, true) when needed.

Performance Notes

ApproachCostBest for
One panel slideDownCheapAccordions, dropdowns, FAQs
Many elements at onceMore layout workPrefer one wrapper when possible
Queued spam clicksWasted frames.stop(true, true) before slide

Height animation triggers layout. One container is cheaper than sliding dozens of siblings — and clearing the queue avoids stacked reveals.

Key Takeaways

  • Role: reveal hidden elements by animating height (since 1.0).
  • Call: $el.slideDown() — default 400 ms; optional easing + complete.
  • Start: hide the element first — then slide down to expand.
  • Pair: .slideUp() to collapse; .slideToggle() for both directions.

One line: .slideDown() expands a hidden element’s height so the page content below slides open with it.

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.

Next: .slideUp() Method

Collapse visible content by animating height to zero — the exit counterpart to slideDown.

.slideUp() tutorial →

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