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 | 0 Kb |
List filter toggle thing | 2,601 Kb |
Spotify Artist Radio Thumbnails | 3,287 Kb |
Burger menu icon | 2,374 Kb |
Cycled placeholders | 2,454 Kb |
Subtle animated gradient background | 1,475 Kb |
A Pen by Alan Shortis | 0 Kb |
2D fluid image | 1,945 Kb |
Orb 2 | 0 Kb |
Shaft of Light | 0 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 |
SVG Text Masking | JMChristensen | 2,141 Kb |
Process Accordion | Devilskitchen | 31,432 Kb |
Sticky div | Kaslab | 2,225 Kb |
Simple Accordion | Wearebold | 3,683 Kb |
CSS3 Fullscreen Background Slideshow | Leetech | 3,435 Kb |
Two tables and header with jspdf-autotable | Someatoms | 2,245 Kb |
GLSL Hills | Ykob | 6,991 Kb |
Background-blend-mode Test | 0x04 | 4,744 Kb |
Jstam.com Home Page | Jstam | 10,558 Kb |
Improve | Gavra | 1,652 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!