Jquery animate() method performs a custom animation of a set of CSS properties to change the state of an element from one to another.
Only numeric values can be animated (like height: "100px"). But string values cannot be animated (like "background-color:green").
**Syntax:**
$(selector).animate( {styles}, speed, easing, callback)
where
PARAMETER
DESCRIPTION
Required/Optional
styles
It determines the css property to animate. The property should be camel-cased like marginLeft instead of margin-left.
Required
speed
Specifies the speed of the animation (fast, slow, milliseconds). Default value is 400 milliseconds.
Optional
easing
Specifies the speed of the element in different points of the animation (like swing, linear). Default value is swing.
Optional
callback
This function to be executed after the animation completes.
0 Comment(s)