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

jQuery slideDown() method

jQuery slideDown() method

jQuery effects methods jQuery effects methods

Example

Show all hidden elements with a sliding motion

element:

$("button").click(function(){

$("p").slideDown();

});

Try it »


Definition and Usage

The slideDown() method displays the selected elements with a sliding motion.

**Note:** slideDown() works with elements hidden via jQuery methods or via display:none declared in CSS (not with elements hidden via visibility:hidden).

**Tip:** To hide elements with a sliding motion, see the slideUp() method. slideUp() method.

Syntax

$(

selector

).slideDown(

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 slideDown() method finishes.

    To learn more about callback, please visit our jQuery Callback chapter on callbacks.

    |

    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 the selected elements up and down.


    jQuery effects methods jQuery effects methods