Progress Bar App
About this app
A simple app that fills up a progress bar by 5%
Progress Bar App Progress Bar App Fill Progress Bar
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>Progress Bar App</title>
<meta name="description" content="A simple app that fills up a progress bar by 5%">
<meta name="keywords" content="progress bar, simple app, fill up">
<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() {
const progressBar = document.getElementById('progress-bar');
const fillButton = document.getElementById('fill-button');
const increaseAmount = 5;
fillButton.addEventListener('click', function() {
let currentWidth = progressBar.offsetWidth;
let newWidth = currentWidth + increaseAmount;
progressBar.style.width = newWidth + '%';
});
});
} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>
<style>
#progress-bar-container {
width: 100%;
height: 20px;
border: 1px solid gray;
border-radius: 10px;
overflow: hidden;
background: linear-gradient(to right, #b4f7d6, #a5f6f5);
}
#progress-bar {
width: 0%;
height: 100%;
background: linear-gradient(to right, #c0eefc, #a5dcef);
transition: width 0.5s ease-in-out;
}
.btn-primary {
background-color: #a5dcef;
border-color: #a5dcef;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<h1>Progress Bar App</h1>
<div id="progress-bar-container">
<div id="progress-bar"></div>
</div>
<button id="fill-button" class="btn btn-primary">Fill Progress Bar</button>
</div>
</body>
</html>
NEW APPS
These are apps made by the community!