How do jQuery slideDown and slideUp work?

jQuery slideDown function shows an element from top to bottom in specified time. slideUp function hides an element from bottom to top in specified interval.

$(element).slideDown(interval, function(){});

$(element).slideUp(interval, function(){});

 

How does jQuery do it?

jQuery adds several attributes such as “display”,”padding-xxx”, and “margin-xxx” to the element and adjusts their values in the specified interval to realize the animation effects. After slideDown finishes, you can see there added an attrubite in the element: display:block. After slideUp finishes, you can see the attribute becomes: display:none, which actually hides the element.

 

Did you like this?
Tip admin with Cryptocurrency

Donate Bitcoin to admin

Scan to Donate Bitcoin to admin
Scan the QR code or copy the address below into your wallet to send some bitcoin:

Donate Bitcoin Cash to admin

Scan to Donate Bitcoin Cash to admin
Scan the QR code or copy the address below into your wallet to send bitcoin:

Donate Ethereum to admin

Scan to Donate Ethereum to admin
Scan the QR code or copy the address below into your wallet to send some Ether:

Donate Litecoin to admin

Scan to Donate Litecoin to admin
Scan the QR code or copy the address below into your wallet to send some Litecoin:

Donate Monero to admin

Scan to Donate Monero to admin
Scan the QR code or copy the address below into your wallet to send some Monero:

Donate ZCash to admin

Scan to Donate ZCash to admin
Scan the QR code or copy the address below into your wallet to send some ZCash:

Leave a Reply