forked from bfintal/Counter-Up2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
33 lines (31 loc) · 1020 Bytes
/
test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>CounterUp2</title>
<script src="dist/counter-up.min.js"></script>
<script type="module">
import counterUp from './index.js';
window.initCounter = () => {
const elements = document.querySelectorAll('.js-counter-up');
elements.forEach((elem) => {
counterUp(elem, {});
});
};
initCounter();
</script>
</head>
<body>
<div class="js-counter-up">5821 V 123kg</div>
<div class="js-counter-up">2635352.3</div>
<div class="js-counter-up" data-duration="2000">22.495 km</div>
<div class="js-counter-up">2635352.3 Mio.</div>
<div class="js-counter-up">The biggest wildcat today is the Siberian Tiger. It can be more than 12 feet (3.6 m) long (about the size of a small car) and weigh up to 700 pounds (317 kg).</div>
<script>
var elements = document.querySelectorAll('.js-counter-up');
Array.prototype.forEach.call(elements, function(elem) {
counterUp.default(elem);
});
</script>
</body>
</html>