Custom animations and effects can be added to various elements to enhance your interface using varying designs and colors.
The animate()
function uses some built-in animations to animate objects in and off the view.
(selector).animate({styles},speed,easing,callback)
The animate function accepts the parameters duration
, easing
, and callback
.
The duration
parameter is optional and is used to specify the speed of the hide and show effect. Its possible values are fast, slow, and milliseconds. The default is 400ms.
The easing
parameter is optional and is used to specify the easing function that is to be used for the animation. The default is string
.
The callback
parameter too is optional and is used to specify the function that is to be called once the animation is complete.