There are no tracking or monitoring cookies on this site. There are only cookies used for documentation examples related to cookies.
Close

Processing...
This may take a few seconds.

slide-up

Syntax

slide-down: selector [every (time)] [after (time)][, (selector)...];

selector = The container to minimise to a height of zero.

The slide-up and slide-down commands allow an element which has "height: auto;" to work with CSS transitions. CSS alone does not support height transitions on elements where height would be "auto" by default.

The slide-up command reduces the the element(s) referenced by the selector height to 0. You still need a CSS transition to get a smooth slide, by using the CSS transition command.

The CSS transition command used in the example below demonstrates how this is done. Take the time to search the internet for "CSS transitions".

slide-up, slide-down accordion