Stats

331 Contributors: 4 Thursday, November 3, 2016
Licensed under: CC-BY-SA
Not affiliated with Stack Overflow
Rip Tutorial: riptutorial@gmail.com
Roadmap: roadmap

jQuery .animate() Method

Syntax

  1. (selector).animate({styles},{options})

Parameters

ParameterDetails
propertiesAn object of CSS properties and values that the animation will move toward
duration(default: 400) A string or number determining how long the animation will run
easing(default: swing) A string indicating which easing function to use for the transition
completeA function to call once the animation is complete, called once per matched element.
startspecifies a function to be executed when the animation begins.
stepspecifies a function to be executed for each step in the animation.
queuea Boolean value specifying whether or not to place the animation in the effects queue.
progressspecifies a function to be executed after each step in the animation.
donespecifies a function to be executed when the animation ends.
failspecifies a function to be executed if the animation fails to complete.
specialEasinga map of one or more CSS properties from the styles parameter, and their corresponding easing functions.
alwaysspecifies a function to be executed if the animation stops without completing.

Related Examples