What is the exact rule of jQuery's animate() parameters?

Posted by Jian Lin on Stack Overflow See other posts from Stack Overflow or by Jian Lin
Published on 2010-06-13T04:42:47Z Indexed on 2010/06/13 4:52 UTC
Read the original article Hit count: 264

Filed under:
|
|

jQuery 1.4.2's animate() API spec is

.animate( properties, [ duration ], [ easing ], [ callback ] )

but it seems that we can supply duration, callback, and no easing

.animate({left: '+= 100'}, 600, doThis)

and it will work.

But if we supply easing and callback and no duration

.animate({left: '+=100'}, 'swing', doThis)

then the easing won't be taken into effect. So what exactly is the API supposed to be?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about animation