jquery plugin counter with number formatting
The jCount plugin was originally created and generously shared by Matt Huggins.
Matt is awesome.
I have added a function to Matt's plugin that formats the numbers (adds commas). Some people think that's awesome too.
For the whole story, read this blog post: http://johnmclaughlin.info/introducing-jcount-a-jquery-countup-plugin-with-output-number-formatting/
The most basic usage of this plugin is to create a DOM element, and apply the
countTo method to it in your JS.
A more detailed example that demonstrates all possible options being used is as follows.
A complete listing of the options that can be passed to the
countTo method is below.
|from||The number to start counting from.|
|to||The number to stop counting at.|
|speed||The number of milliseconds it should take to finish counting.|
|refreshInterval||The number of milliseconds updating the count.|
|onComplete||A callback function the is triggered when counting finishes. The final value is passed to the function, and it is run in the context of the DOM element|
jCount and jQuery-countTo are released under the MIT license.