5. animate():
The method performs custom animation of a set of CSS properties. This method changes an element from one state to another with CSS styles.
The CSS property value is changed gradually, to create an animated effect.
Syntax: (selector).animate({styles},speed,easing,callback) where “styles” is a required field that specifies one or more CSS properties/values to animate. The properties need to be mentioned in camel casing style.
The parameters “speed”, “easing” and “callback” in the syntaxes of the above methods represent:
speed: Optional parameter and used for specifying the speed of the effect. The default value is 400 milliseconds. The possible value of speed are “slow”, “fast” or some number in milliseconds.
easing: Again optional parameter is used for specifying the speed of elements to different types of animation. The default value is “swing”. The possible value of easing are “swing” and “linear”.
callback: Optional parameter. The callback function specified here is executed after the effect method is completed.