Count up
How do I make an count up?
What is a count up? How do you make a count up? This script and codes were developed by Alan Shortis on 14 November 2022, Monday.
Count up - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Count up</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="number">820</div>
<div class="number">1250</div>
<div class="number">200</div> <script src="js/index.js"></script>
</body>
</html>
Count up - Script Codes CSS Codes
@import url("https://fonts.googleapis.com/css?family=Roboto");
html { height: 100%;
}
body { display: flex; align-items: center; justify-content: space-around; min-height: 100%; background-color: #333333; color: #fefefe;
}
.number { font-size: 3rem; font-family: 'Roboto';
}
Count up - Script Codes JS Codes
function _countUp(numberElement) { var current = 0; var total = parseInt(numberElement.innerHTML); var countSpeed = Math.abs(Math.floor(2000 / total)); var timer = setInterval(function countIt() { current += 1; numberElement.innerHTML = current.toLocaleString(); (current == total) && clearInterval(timer); }, countSpeed);
}
var elements = document.querySelectorAll('.number');
for (var i = 0; i < elements.length; i++) { _countUp(elements[i]);
}
Developer | Alan Shortis |
Username | alanshortis |
Uploaded | November 14, 2022 |
Rating | 3 |
Size | 2,391 Kb |
Views | 22,264 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Orb 2 | 0 Kb |
Dropbox logo with CSS Grid | 0 Kb |
Spotify Artist Radio Thumbnails | 3,287 Kb |
Toggle Buttons | 3,150 Kb |
2D fluid image | 1,945 Kb |
Burger menu icon | 2,374 Kb |
Overlapping Circles | 0 Kb |
Flexbox responsive embed | 2,086 Kb |
Shaft of Light | 0 Kb |
Single div CSS loaders | 2,611 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Force Counter | Kenlauguico | 2,732 Kb |
Fluid Grid 12 | Alexoliverwd | 2,309 Kb |
Basecamp 3 Document | Lachlanjc | 3,811 Kb |
Main page display | BarryKe | 4,562 Kb |
Multi column experiment. | Spylefkaditis | 2,805 Kb |
A Pen by Oliver Schafeld | Schafeld | 1,720 Kb |
Loading... | Adamjacob | 2,384 Kb |
CSS Hover Effects | Alen | 3,613 Kb |
Parallax.js | Zmeeey5 | 2,330 Kb |
Z-index demo | Kblh | 1,534 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!