slideToggle() Method in jQuery
slideToggle()
The slideToggle() method is used to slide up or slide down the selected element.
Syntax:-
Its syntax is:- $(selector).slideToggle(speed, easing, callback)
Further Explanation:-
Parameter | Description |
---|---|
speed | Optional. Specifies the speed of the fading effect. The default is 400 milliseconds. |
easing | Optional. Specifies the speed of the element at different points of the animation. The default is swing. |
callback | Optional. A function to be executed after the slideToggle() method is completed. |
Code Explanation
All Tutorials related to jQuery Advance
DOM Traversal methods
remove() Method
empty() Method
Event Handling
on() Method
Hide(), Show(), Toggle()
fadeIn(), fadeOut(), fadeToggle()
slideUp(), slideDown()
slideToggle()
animate()