jQuery .slideDown() Method

Beginner
⏱️ 9 min read
📚 Updated: Jul 2026
🎯 5 Examples
🚀 5 Try-it labs
Height Reveal

What You’ll Learn

The .slideDown() instance method displays matched elements with a sliding motion by animating height. This tutorial covers all three overloads since jQuery 1.0 (including easing since 1.4.3), default and preset durations, per-element callbacks, comparisons with .slideUp(), .show(), .fadeIn(), and .slideToggle(), and five hands-on examples from the official jQuery API.

01

Reveal

Hidden → full height

02

Duration

ms, fast, slow

03

Three overloads

Positional / options

04

Easing

Since 1.4.3

05

Callbacks

Once per element

06

fx queue

Chain with slideUp

Introduction

Instant .show() makes content appear in one frame. When you want a vertical expand — an accordion panel, dropdown menu, or FAQ answer sliding open — .slideDown() is the shorthand jQuery effect for that job.

Available since jQuery 1.0, .slideDown() animates the height of matched elements so lower page content slides down to make room. It enqueues on the default fx queue like other effects, which means you can chain it after .hide(), .delay(), or another animation for readable sequential reveals.

Understanding the .slideDown() Method

Per the official jQuery API, .slideDown() displays the matched elements with a sliding motion. The method animates height from zero to the element’s natural size, causing content below to shift downward as the reveal progresses.

Elements should start hidden — typically via .hide() or CSS display: none. jQuery restores display so the box can render, tweens height over the duration you supply, then leaves the element fully expanded and visible.

💡
Beginner Tip

Think of .slideDown() as the vertical entrance to .slideUp()’s collapse. Hide first, slide down when ready — one line replaces manual height and display juggling.

📝 Syntax

Three overloads of .slideDown:

jQuery
// 1) Duration and complete callback
jQuery( selector ).slideDown( [duration ] [, complete ] )
// 2) Options object — queue, step, Promise callbacks
jQuery( selector ).slideDown( options )
// 3) Duration, easing, complete — since jQuery 1.4.3
jQuery( selector ).slideDown( [duration ] [, easing ] [, complete ] )

Parameters

  • duration (Number or String, default 400) — milliseconds, or "fast" (200) / "slow" (600).
  • easing (String, default "swing", since 1.4.3) — built-in swing or linear; plugins add more.
  • complete (Function) — called once per matched element when that element’s slide finishes.
  • options.queue (Boolean or String, default true) — false runs immediately; string names a custom queue.
  • options.step, progress, start, done, fail, always — same Promise-style hooks as other effects (since 1.8).

Return value

  • A jQuery object for chaining further queued methods on the same set.

Official jQuery API description

jQuery
// With the element initially hidden, show it slowly:
$( "#clickme" ).on( "click", function() {
  $( "#book" ).slideDown( "slow", function() {
    // Animation complete.
  });
});

⚡ Quick Reference

GoalCode
Default 400 ms reveal$el.slideDown()
Slow reveal (600 ms)$el.slideDown("slow")
Custom duration + callback$el.slideDown(800, function() { ... })
Linear easing since 1.4.3$el.slideDown(600, "linear", function() { ... })
Options overload$el.slideDown({ duration: 500, easing: "linear", complete: fn })
Reset then slide reveal$el.hide().slideDown(800)

📋 .slideDown() vs slideUp vs show vs fadeIn vs slideToggle

Five ways to change visibility — only .slideDown() unhides and expands height with a sliding motion in one shorthand call.

.slideDown()
$el.slideDown("slow")

Unhides hidden elements and animates height open — lower content slides down to make room

.slideUp()
$el.slideUp("slow")

Opposite collapse — animates height to zero then hides; pair with .slideDown() for accordion UX

.show()
$el.show()

Instant reveal with no height transition — use when animation is not needed

.fadeIn()
$el.fadeIn("slow")

Opacity reveal — no height animation; content below does not slide to make room

.slideToggle()
$el.slideToggle("slow")

Auto-picks slideDown or slideUp based on current visibility — one method for toggle panels

Examples Gallery

Each example demonstrates an official jQuery API .slideDown() pattern. Open DevTools or use the Try-it links. All five mirror live demos on api.jquery.com/slideDown/.

📚 Getting Started

Official jQuery API demos — basic click-to-reveal and body-click toggle patterns.

Example 1 — Basic Usage: Hidden #book slideDown("slow") on Click

With the element initially hidden, click #clickme to slide down #book over the slow preset (600 ms).

jQuery
// With the element initially hidden, we can show it slowly:
$( "#clickme" ).on( "click", function() {
  $( "#book" ).slideDown( "slow", function() {
    // Animation complete.
  });
});
Try It Yourself

How It Works

.slideDown("slow") maps to 600 milliseconds. jQuery sets display so the element can render, animates height from 0 to full size, and fires the callback once per matched element when done.

Example 2 — Toggle All Divs slideDown("slow") or hide (Official Example 1)

Each body click checks whether the first div is hidden. If so, all divs slide down slowly; otherwise they hide instantly.

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

How It Works

:hidden on the first div decides direction. When hidden, .slideDown("slow") expands every matched div in parallel; when visible, .hide() collapses them without animation.

📈 Advanced Patterns

Callback styling, default duration, and easing since jQuery 1.4.3.

Example 3 — Hidden Inputs slideDown(1000) with Callback (Official Example 2)

Click a div to slide down all hidden inputs over 1000 ms. In the callback, style inputs with a red inset border, highlight the middle input yellow, and focus it.

jQuery
$( "div" ).on( "click", function() {
  $( this ).css( {
    borderStyle: "inset",
    cursor: "wait"
  } );
  $( "input" ).slideDown( 1000, function() {
    $( this )
      .css( "border", "2px red inset" )
      .filter( ".middle" )
      .css( "background", "yellow" )
      .trigger( "focus" );
    $( "div" ).css( "visibility", "hidden" );
  } );
});
Try It Yourself

How It Works

The complete callback runs once per input after its slide finishes. Inside, this refers to each input element — ideal for per-element styling and focusing the middle field without nested timers.

Example 4 — Default slideDown() 400 ms on Hidden Panel

Omit the duration argument to use the default 400 ms slide when the user clicks a button to reveal a hidden panel.

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

How It Works

When duration is omitted, jQuery uses 400 ms. This is the simplest reveal call — hide the panel with CSS or .hide(), then .slideDown() on click.

Example 5 — slideDown(600, "linear", callback) with Easing Since 1.4.3

Use the three-argument overload to pick linear easing instead of the default swing curve, with a completion callback.

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

How It Works

Since jQuery 1.4.3, the middle argument names an easing function. Built-in options are swing (default, accelerates mid-animation) and linear (constant rate). jQuery UI adds more easing plugins.

🚀 Common Use Cases

  • Accordion and FAQ panels — slide down answers hidden with display: none on header click.
  • Dropdown menus — reveal nested submenus with a vertical slide instead of instant pop-in.
  • Progressive disclosure — toggle all hidden divs open or closed, as in the official body-click demo.
  • Form field reveals — slide down hidden inputs and focus the active field in the complete callback.
  • Notification drawers — chain .hide().slideDown() for repeatable alert-style messages.
  • Effect chains — combine with .delay() and .slideUp() for full expand/collapse choreography on the fx queue.

🧠 How .slideDown() Reveals an Element

1

Element starts hidden

Target must be hidden — display: none from .hide() or CSS. Already-visible elements see little change.

Prerequisite
2

Display restored, height at 0

jQuery sets display so the box can render, then begins the height tween from zero toward the element’s natural size.

Setup
3

Height animates over duration

Default 400 ms, or your chosen ms / fast / slow with optional swing or linear easing. Lower content slides down to make room.

Tween
4

Full height and callback

Element ends at natural height and visible. complete fires once per matched element; fx queue advances to the next step.

📝 Notes

  • Available since jQuery 1.0; easing overload added in 1.4.3; Promise callbacks in options since 1.8.
  • Default duration is 400 ms; "fast" = 200 ms, "slow" = 600 ms.
  • Animates height, not opacity — lower page content physically slides down to accommodate the reveal.
  • Callbacks fire once per matched element — use .promise().done() for one set-level callback.
  • Elements should be hidden first; calling on visible content produces minimal visible effect.
  • Set jQuery.fx.off = true globally to disable all effects including .slideDown() (duration becomes 0).
  • IE note: if .slideDown() is called on a <ul> whose <li> children have position: relative, absolute, or fixed, the effect may fail in IE6–IE9 unless the ul has layout. Add position: relative; and zoom: 1; to the ul to fix it.

Browser Support

.slideDown() is a jQuery instance method since 1.0+. It uses jQuery’s internal fx engine and height tweens — behavior is consistent wherever jQuery runs, independent of CSS transition support.

Stable · jQuery 1.0+

jQuery .slideDown()

Supported in all jQuery 1.x, 2.x, 3.x, and 4.x releases. Works in Chrome, Firefox, Safari, Edge, IE 6+ (with compatible jQuery builds), and Node.js via jsdom.

100% jQuery slideDown API support
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: Learn .slideDown() alongside .slideUp(), .slideToggle(), and .finish() to build polished expand and collapse sequences in legacy and modern jQuery apps.

Conclusion

The .slideDown() method is jQuery’s shorthand for revealing hidden elements with a vertical sliding motion. Three overloads cover simple durations, options objects, and easing since 1.4.3.

Hide elements first, pick your duration or preset, and use the complete callback to chain follow-up effects. Pair this method with .fadeToggle() behind you and .finish() ahead to master interrupting and controlling the fx pipeline.

💡 Best Practices

✅ Do

  • Hide elements with .hide() or CSS before calling .slideDown()
  • Use "slow" / "fast" for readable preset timing across your app
  • Chain .hide().slideDown() to replay accordion-style reveals on repeated clicks
  • Use the complete callback to style revealed elements or focus inputs without setTimeout
  • Call .promise().done() when you need one callback after all elements finish

❌ Don’t

  • Expect visible elements to animate — .slideDown() is for hidden content
  • Use .slideDown() when you need an opacity fade — choose .fadeIn() instead
  • Forget the IE ul/li layout fix when list items use positioned CSS
  • Assume one callback covers the whole set — it fires per matched element
  • Forget jQuery.fx.off in tests — it zeroes duration for all effects globally

Key Takeaways

Knowledge Unlocked

Five things to remember about .slideDown()

Shorthand reveal by sliding hidden elements open with a height animation.

5
Core concepts
02

Three overloads

Positional / options

API
🔄 03

400 / fast / slow

Default durations

Timing
📝 04

Per-element cb

Not once per set

Callback
👁 05

Start hidden

display:none first

Rule

❓ Frequently Asked Questions

.slideDown() displays matched elements with a sliding motion by animating their height from zero to full size. Lower page content slides down to make room for the revealed items. Use it when you want 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 by animating height to zero then hiding. .show() reveals instantly with no transition. .fadeIn() animates opacity, not height. .slideToggle() picks slideDown or slideUp based on current visibility. .slideDown() unhides and expands height in one call.
Duration is in milliseconds. Default is 400 ms when omitted. The strings "fast" (200 ms) and "slow" (600 ms) map to preset speeds, the same as other jQuery effect methods.
The complete callback runs once per matched element when that element's slide finishes — not once for the entire set. Use .promise().done() when you need a single callback after all elements complete.
Yes. .slideDown() is meant for elements that are hidden — typically display:none or visibility:hidden via .hide(). Calling it on already-visible elements has little visible effect because they are already expanded and shown.
Did you know?

The official jQuery .slideDown() input demo slides all hidden fields down over 1000 ms, then runs styling and .trigger("focus") on the middle input inside the completion callback. That pattern — slow height reveal, per-element callback styling — is one of the most copied sequencing tricks in the slide effects API, and it needs no setTimeout at all.

Continue to .slideUp()

Collapse visible elements with a vertical slide — height animates to zero then display:none.

.slideUp() →

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.

6 people found this page helpful