Ajaxorized

Now that’s a smooth counter

October 26, 2008

It's been a while, but a new piece of Javascript is here to add some dynamics to your web-page. SmoothCounter is a script that enables you to count between 2 numbers (with a given precision) in a given period of time. Click here for a demo.

SmoothCounter

Usage:

var counter = new SmoothCounter('count-div', { countTo : 100, duration : 3, precision : 2});
counter.start();

Where 'count-div' is the id-property of the element where the start-number is located. The countTo and duration options indicate to the end-number and the duration in seconds. The precision option is used to set the precision.

A working demo is provided in this download, I'd like to see the implementations!

Enjoy.

Add to: del.icio.us Reddit Slashdot Digg Facebook Technorati Google StumbleUpon Windows Live Yahoo
topFiled under: Ajaxorized, Prototype, Javascript | Willem @ 6:33 pm | Comments (0)