Posted On: Feb 22, 2018
There are three different sliding methods available in jQuery.
SlideDown() :This method is used to slideDown an element.
Syntax
$(selector).slideDown(speed,callback);
Here the speed parameter specifies the duration of the slideDown effect such as “slow”, “fast", or in milliseconds. The callback function is optional and is executed after the animation slideDown is completed on the specified element.
SlideUp() : It is the opposite of the sideDown() method. It is used to slide up an element.
Syntax
$(selector).slideUp(speed,callback);
The speed parameter specifies the duration and the optional callback function is executed after the animation is completed.
SlideToggle() :This method is used to toggle between the slideUp() and slideDown() method. If the element has been slid up, this method will slide them up and vice versa.
Syntax
$(selector).slideToggle(speed,callback);
The speed parameter specifies the duration of the effect. The callback function is an optional function that is executed after the completion of the effect.
Never Miss an Articles from us.
jQuery is a lightweight JavaScript library which gives a quick and simple method for HTML DOM traversing and manipulati..
There are many advantages of JQuery. Some of them are :It is more like a JavaScript enhancement so there is no overhea..
There are 3 types of selectors in JqueryCSS Selector XPath Selector Custom Selector..