jQuery slideUp() method
Example
Hide all elements with a sliding motion
element:
$("button").click(function(){
$("p").slideUp();
});
Try it »
Definition and Usage
The slideUp() method hides the selected elements with a sliding motion.
**Note:** Hidden elements will not be fully displayed (they no longer affect the page's layout).
**Tip:** To show elements with a sliding motion, see the slideDown() method. slideDown() method.
Syntax
$(
selector
).slideUp(
speed,easing,callback
)
| Parameters | Description |
|---|---|
| speed | Optional. Specifies the speed of the sliding effect.
Possible values: |
Possible values:
- "swing" - Moves slowly at the beginning/end, and faster in the middle
- "linear" - Moves at a constant speed
To learn more about callback, please visit our jQuery Callback chapter on callbacks.
|More examples
slideUp() - Using the speed parameter
How to use the speed parameter to specify the speed of the sliding effect.
slideUp() - Using the callback parameter
How to use the callback parameter when sliding the selected elements up and down.
jQuery effects methods