Skip to content
jquery plugin counter with number formatting
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


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:


jCount requires the latest version of jQuery.


The most basic usage of this plugin is to create a DOM element, and apply the countTo method to it in your JS.

<script type="text/javascript"><!--
    $('.timer').countTo({from: 0, to: 500});

<span class="timer"></span>

A more detailed example that demonstrates all possible options being used is as follows.

<script type="text/javascript"><!--
        from: 50,
        to: 2500,
        speed: 1000,
        refreshInterval: 50,
        onComplete: function(value) {

<span class="timer"></span>


A complete listing of the options that can be passed to the countTo method is below.

Option Description
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

Created By:

Matt Huggins


jCount and jQuery-countTo are released under the MIT license.

You can’t perform that action at this time.