jQuery slideUp()Methods
Examples
Hide all <p> elements with a sliding motion:
$("button").click(function(){
$("p").slideUp();
});
$("p").slideUp();
});
Try it Yourself »
Definition and Usage
The slideUp() method hides the selected elements with a sliding motion.
Note:Hidden elements will not be displayed at all (they no longer affect the page layout).
Tip:To display elements with a sliding motion, see theslideDown()method.
Syntax
$(selector).slideUp(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 in the animation. Default value is "swing". Possible values:
|
| callback | Optional. A function to execute after the slideUp() method has finished. To learn more about callback, please visit ourjQuery Callbackchapter. |
More Examples
slideUp() - Use the speed parameter
How to use the speed parameter to specify the speed of the sliding effect.
slideUp() - Use the callback parameter
How to use the callback parameter when sliding selected elements up and down.
Other Extensions
jQuery Effect Methods