If your browser is compatible, you should see an incrementing counter below:
The latest version of this code should be at:
http://www.brock-family.org/gavin/software/web/
Create an odometer widget:
myOdometer = new Odometer(htmlElem, opts);
Set the value on the odometer:
myOdometer->set(val);
Get the current value from the odometer:
val = myOdometer->get();
<html>
<script src="/odometer.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
div = document.getElementById("odometerDiv");
myOdometer = new Odometer(div, {digits: 10, tenths: true});
myOdometer.set(123.83);
//]]>
<div id="odometerDiv"><div>
</script>
</html>
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 http://www.gnu.org/licenses/.