Get started with odometer.js CDN

MIT licensed

Odometer.js is a lightweight library for creating animated, looping odometer counters.

Tags:
  • numbers
  • transition

Stable version

Copied!

How to start using odometer.js CDN


<!DOCTYPE html>
<html>
<head>
    <title>Get started with odometer.js CDN - cdnhub.io</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" />
    <script src="https://cdn.cdnhub.io/odometer.js/0.4.8/odometer.min.js"></script>
    <style>
        #counter {
            font-size: 3em;
            text-align: center;
        }
    </style>
</head>
<body>
    <div id="counter" data-odometer-value="0" data-odometer-final-value="10000" data-odometer-theme="minimal" data-odometer-animate="count">
        <div class="odometer-value"></div>
        <div class="odometer-pulse"></div>
    </div>

    <script>
        document.addEventListener("DOMContentLoaded", function() {
            const counter = document.querySelector("#counter");
            const odometer = new Odometer.default(counter);
            odometer.update(10000);
        });
    </script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!

All versions