jQuery slideDown()Method
Example
Display all hidden <p> elements with a sliding effect:
$("button").click(function(){
$("p").slideDown();
});
$("p").slideDown();
});
Try it Yourself »
Definition and Usage
The slideDown() method displays the selected elements with a sliding effect.
Note:slideDown() works on elements hidden by jQuery methods or hidden with display:none in CSS (but does not work on elements hidden with visibility:hidden).
Tip:To hide elements with a sliding effect, seeslideUp()method.
Syntax
$(selector).slideDown(speed,easing,callback)
| Parameter | Description |
|---|---|
| speed | Optional. Specifies the speed of the sliding effect. Possible values:
|
| easing | Optional. Specifies the speed of the element at different points of the animation. Default value is "swing". Possible values:
|
| callback | Optional. A function to execute after the slideDown() method is completed. To learn more about callbacks, please visit ourjQuery Callbackchapter. |
More Examples
slideDown() - Using the speed parameter
How to use the speed parameter to specify the speed of the sliding effect.
slideDown() - Using the callback parameter
How to use the callback parameter when sliding selected elements up and down.
Other Extensions
jQuery Effects Methods