Animate: Animate page element updating a given style value

Recommend this page to a friend!
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 293 All time: 154 This week: 8Up
Version License JavaScript version Categories
animate 1.0GNU General Publi...1.0Animation
Description Author

This object can animate a page element by updating a style value progressively.

It takes a given page element and retrieves the current value of a given numeric style value.

The object repeatedly updates the value of the style value until it reaches a given final value.

The calculation of each new value of the element style can be defined by different functions of a separate object. Different types of functions are provided to implement several levels of animation smoothness.

The time interval between the start and the end of the animation is a configurable parameter.

The object can invoke given callback functions every time the page element style value is updated, as well when the animation is completed.

Innovation Award
JavaScript Programming Innovation award nominee
February 2013
Number 4
A simple form of animating Web page elements is to gradually change the value of CSS attributes from their current value to a target value.

This class can animate any page element by incrementing or decrementing any numeric CSS property value until it reaches a final value.

It uses a configurable smoothing object that determines the attribute value for each step.

Manuel Lemos
Picture of Rafael Lúcio
  Performance   Level  
Name: Rafael Lúcio <contact>
Classes: 11 packages by
Country: Brazil Brazil
Age: 35
All time rank: 51 in Brazil Brazil
Week rank: 6 Down1 in Brazil Brazil Equal
Innovation award
Innovation award
Nominee: 3x

  Files folder image Files  
File Role Description
Plain text file anim.js Class JS Class
Plain text file example.html Example Usage

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:154
This week:8Up