Sliding elements out of view
The slideUp()
method
works in exactly the same way as slideDown()
, except that it hides the target element instead of showing it. The slideUp()
method accepts the same arguments as slideDown()
and can be affected by CSS in the same way, so padding
and margin
should be taken into account and caution is advised when using absolute
positioning. The original value of an element's display
property however, is not a factor when using slideUp()
.
The method's pattern of usage is as follows:
jQuery(elements).slideUp([duration], [easing], [callback]);
Get jQuery 1.4 Animation Techniques Beginner's Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.