Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery slideUp() method

jQuery slideUp() method

jQuery effects methods jQuery effects methods

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:

  • Millisecond
  • "slow"
  • "fast"
  • | | *easing* | Optional. Specifies the speed of the element at different points in the animation. The default is "swing".

    Possible values:

    **Tip:** More easing functions are available in extension plugins. | | *callback* | Optional. A function to be executed after the slideUp() method finishes.

    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 jQuery effects methods