Skip to content
jQuery.counter (javascript + css3)
CSS JavaScript
Find file
Latest commit 4ee108b Sep 1, 2014 @pricco pricco Merge pull request #16 from Zhomart/master
added bower.json
Failed to load latest commit information.
examples new style: jquery-counter-analog3 Aug 28, 2014
src analog3 fixed Aug 28, 2014
LICENSE LICENSE May 21, 2012
README.md Update README.md Dec 26, 2012
bower.json analog3 fixed Aug 28, 2014
package.json added AMD Oct 13, 2012

README.md

jQuery.counter (javascript + css3)

Info + Demo: http://sophilabs.github.com/jquery-counter

jQuery Counter

A jQuery counter based on http://code.google.com/p/jquery-countdown with more options.

Options

Options can be set by attribute data-<name>="value" or in the options hash on counter initialization: $(element).counter({name: value, ...})

direction: up|down Counter direction

format: string Defines the format and the limit for each part - e.g: 23:59:59

interval: number Defines the time between each counter increment - by default 1000 milliseconds

stop: string Defines the counter limit - eg: 10:00 (ten minutes)

Methods

Methods can be call using $(element).counter('method')

play Play counter

reset Reset counter

stop Stop counter

Events

counterStop Raised when the counter reach limit

Example

10 seconds countdown:

<span class="counter counter-analog">0:10</span>
<script>
    $('.counter').counter();
</script>

120 seconds count:

<span class="counter counter-analog" data-direction="up" data-format="120">0</span>
<script>
    $('.counter').counter();
</script>

License

MIT License

Something went wrong with that request. Please try again.