Automatic Zeroes Counter
About this app
An engaging web app that automatically counts and displays up to one thousand zeroes with a touch of color and animation.
Automatic Zeroes Counter Automatic Zeroes Counter Start Counting
Related apps
Put this on your site
Source
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Automatic Zeroes Counter</title>
<meta name="description" content="An engaging web app that automatically counts and displays up to one thousand zeroes with a touch of color and animation.">
<meta name="keywords" content="Zeroes Counter, Fun App, JavaScript, Animation, Count, Colorful">
<!-- Libraries -->
<!-- jQuery (3.6.0) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js" crossorigin="anonymous"></script>
<!-- Bootstrap CSS (5.3.3) -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" crossorigin="anonymous">
<!-- Bootstrap JS (5.3.3) -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js" crossorigin="anonymous">
</script>
<!-- Font Awesome (6.6.0) -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.6.0/css/fontawesome.min.css" crossorigin="anonymous">
<script type="text/javascript">
try {
// App Javascript Goes Here. Place your entire script content inside the try block for error handling.
// This will run when the DOM is ready.
document.addEventListener("DOMContentLoaded", function() {
let counter = 0;
const maxCount = 1000;
const displayArea = $("#zeroesDisplay");
function updateDisplay() {
displayArea.html("0".repeat(counter));
}
function animateZeros() {
if (counter < maxCount) {
setTimeout(() => {
counter++;
updateDisplay();
animateZeros();
}, 10);
} else {
displayArea.css("color", "gold");
displayArea.animate({fontSize: "2em"}, 500);
$(".zeroes-container").fadeIn();
}
}
$("#startButton").click(function() {
counter = 0;
$(".zeroes-container").hide();
displayArea.css("color", "black");
animateZeros();
});
});
} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>
<style>
body {
background: linear-gradient(45deg, #f39c12, #16a085);
color: white;
font-family: 'Arial', sans-serif;
text-align: center;
padding -top: 50px;
}
#main-container {
margin-top: 20px;
}
.zeroes-container {
font-size: 1.5em;
margin-top: 20px;
padding: 20px;
border: 2px solid white;
border-radius: 10px;
display: none;
}
button {
margin-top: 20px;
font-size: 1.2em;
}
.animated-button {
transition: transform 0.2s;
}
.animated-button:active {
transform: scale(0.95);
}
</style>
</head>
<body>
<div id="main-container" class="container">
<h1>Automatic Zeroes Counter</h1>
<button id="startButton" class="btn btn-light animated-button">Start Counting</button>
<div class="zeroes-container" id="zeroesDisplay"></div>
</div>
</body>
</html>
NEW APPS
These are apps made by the community!