May 07, 2021 jQuery
The jQuery sliding method allows elements to slide up and down.
Click here to hide/display the panel
An inch of light and an inch of gold, so we provide you with fast and easy to understand the content of learning.
Here you can get any knowledge you need in an easy-to-understand and convenient model.
jQuery slideDown()
Demonstrate the jQuery slideDown() method.
jQuery slideUp()
Demonstrate the jQuery slideUp() approach.
jQuery slideToggle()
Demonstrates the jQuery slideToggle() approach.
With jQuery, you can create a sliding effect on an element.
jQuery has the following sliding methods:
The jQuery slideDown() method is used to slide elements down.
Grammar:
The optional speed parameter specifies the length of the effect. It can take the following values: "slow," "fast," or milliseconds.
The optional callback parameter is the name of the function executed after the slide is complete.
The following example demonstrates the slideDown() approach:
The jQuery slideUp() method is used to slide elements up.
Grammar:
The optional speed parameter specifies the length of the effect. It can take the following values: "slow," "fast," or milliseconds.
The optional callback parameter is the name of the function executed after the slide is complete.
The following example demonstrates the slideUp() approach:
The jQuery slideToggle() method can be switched between the slideDown() and slideUp() methods.
If the elements slide down, slideToggle() slides them up.
If the elements slide up, slideToggle() slides them down.
The optional speed parameter specifies the length of the effect. It can take the following values: "slow," "fast," or milliseconds.
The optional callback parameter is the name of the function executed after the slide is complete.
The following example demonstrates the slideToggle() approach: