You can simply use the jQuery slideUp() and slideDown() methods to hide and show the HTML elements with a smooth sliding motion using a single line of code.
Let's try out the following example to understand how these methods basically work:
Alternatively, you can use the jQuery slideToggle() method that perform both slide up and down animation in such a way that if the element is initially displayed, it will be hidden; and if it is hidden, it will be shown. Let's check out the following example to see how it works:
Use the jQuery
slideUp()andslideDown()methodsYou can simply use the jQuery
slideUp()andslideDown()methods to hide and show the HTML elements with a smooth sliding motion using a single line of code.Let's try out the following example to understand how these methods basically work:
Alternatively, you can use the jQuery slideToggle() method that perform both slide up and down animation in such a way that if the element is initially displayed, it will be hidden; and if it is hidden, it will be shown. Let's check out the following example to see how it works:
need an explanation for this answer? contact us directly to get an explanation for this answer