forked from srexi/purecounterjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
69 lines (62 loc) · 2.89 KB
/
index.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>PureCounter Example</title>
</head>
<body>
<div>
<p>Take it easy (count to 10 in 60 seconds): <span data-purecounter-end="10" data-purecounter-duration="60"
data-purecounter-once="true" class="purecounter">0</span></p>
</div>
<div style="margin-top:100vh;">
<p>So close yet so far: <span data-purecounter-duration="2.5" data-purecounter-end="9000"
class="purecounter">0</span>
</p>
</div>
<div style="margin-top:100vh;">
<p>We can do pulsing (restart the counter after a delay): <span data-purecounter-duration="2.5" data-purecounter-end="9000" data-purecounter-pulse="5000"
class="purecounter">0</span>
</p>
</div>
<div style="margin-top:100vh;">
<p>It's going backwards: <span data-purecounter-duration="3" data-purecounter-start="9000"
data-purecounter-end="0" data-purecounter-once="false" class="purecounter">0</span></p>
</div>
<div style="margin-top:100vh;">
<p>With Decimals: <span data-purecounter-start="0" data-purecounter-end="9000.01" data-purecounter-decimals="2"
data-purecounter-once="true" class="purecounter">0</span></p>
</div>
<div style="margin-top:100vh;">
<p>Final Form with custom thousands separator: <span data-purecounter-start="0"
data-purecounter-end="9000000.01" data-purecounter-decimals="2" data-purecounter-separator=","
data-purecounter-once="true" class="purecounter">0</span></p>
</div>
<div style="margin-top:100vh;">
<p>Final Form in Currency Format with custom symbol and decimals: <span data-purecounter-duration="3"
data-purecounter-start="0" data-purecounter-end="9900000" data-purecounter-currency="$"
data-purecounter-decimals="2" data-purecounter-once="true" class="purecounter">0</span></p>
</div>
<div style="margin-top:100vh;">
<p>Test filesizing counter with custom selector: <span data-purecounter-end="9900000" class="filesizecount">0</span></p>
</div>
<div style="margin-top:100vh;">
<p>It's over (wait for it): <span data-purecounter-duration="2.5" data-purecounter-end="9001"
class="purecounter">0</span>
</p>
</div>
<script src="dist/purecounter.js"></script>
<script>
// Initialize PureCounter by Default. It also can be stored on variable
new PureCounter();
// Initialize PureCounter using custom selector and custom default configuration.
// It also can be stored on variable
new PureCounter({
filesizing: true,
selector: ".filesizecount",
});
</script>
</body>
</html>