Barra de Progresso
About this app
Um app de barra de progresso que vai de 1 Milhão até 10 Milhões
Barra de Progresso Barra de Progresso Iniciar
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>Barra de Progresso</title>
<meta name="description" content="Um app de barra de progresso que vai de 1 Milhão até 10 Milhões">
<meta name="keywords" content="barra de progresso, 1 Milhão, 10 Milhões">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<script type="text/javascript">
try {
// App Javascript Goes Here. Place your entire script content inside the try block for error handling.
document.addEventListener("DOMContentLoaded", function() {
var progressBar = document.getElementById('progress-bar');
var startButton = document.getElementById('start-button');
startButton.addEventListener('click', function() {
startButton.disabled = true;
progressBar.classList.remove('d-none');
var currentValue = 1000000;
var targetValue = 10000000;
var increment = Math.ceil((targetValue - currentValue) / 100);
var interval = setInterval(function() {
currentValue += increment;
progressBar.style.width = ((currentValue - 1000000) / 9000000) * 100 + '%';
if (currentValue >= targetValue) {
clearInterval(interval);
startButton.disabled = false;
}
}, 100);
});
});
} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>
<style>
/* App CSS Goes Here */
.progress {
height: 20px;
border-radius: 10px;
margin-bottom: 20px;
overflow: hidden;
}
.progress-bar {
width: 0%;
transition: width 0.3s ease-in-out;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<h1>Barra de Progresso</h1>
<div class="progress d-none" id="progress-bar">
<div class="progress-bar progress-bar-striped progress-bar-animated bg-success" role="progressbar"></div>
</div>
<button class="btn btn-primary" id="start-button">Iniciar</button>
</div>
</body>
</html>
NEW APPS
These are apps made by the community!