Gavin Brock's CSS/JavaScript Animated Odometer

Version 1.0 - April 7th 2008

If your browser is compatible, you should see an incrementing counter below:



The latest version of this code should be at:


Create an odometer widget:
myOdometer = new Odometer(htmlElem, opts);

Set the value on the odometer:

Get the current value from the odometer:
val = myOdometer->get();


	<script src="/odometer.js" type="text/javascript"></script>
	<script type="text/javascript">
		div = document.getElementById("odometerDiv");
		myOdometer = new Odometer(div, {digits: 10, tenths: true});
	<div id="odometerDiv"><div>


This was tested on:


Copyright (C) 2008 Gavin Brock

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see