Monday, 13 February 2012

jQuery: How to animate opacity (from hidden to visible)

Assuming we want to animate all the divs...and that the initial opacity of the divs is 0 (not visible):
var $elem = $('.div');


Method signature:
.animate( properties [, duration] [, easing] [, complete] )


* properties: A map of CSS properties that the animation will move toward.
* duration: A string or number determining how long the animation will run.
* easing: A string indicating which easing function to use for the transition.
* complete: A function to call once the animation is complete.

No comments:

Post a Comment