jQuery animate() Method
jQuery animate() Method
The animate() method is used to perform a custom animation on a set of CSS properties. It is used to change the element from one state to another by using CSS styles. In this, the CSS property value changed gradually with an animated effect.
Syntax:-
Its syntax is:- (selector).animate({styles}, speed, easing, callback);
Further Explanation:-
Parameter | Description |
---|---|
styles | Required. Specifies one or more CSS properties/values to animate. THe property name must be written in came-cased. |
speed | Optional. Specifies the speed of the animation. Default value is 400 milliseconds |
easing | Optional. Specifies the speed of the element in different points of the animation. Default is swing. |
callback | Optional. A function to be executed after the animation completes. |