Running Endless App
About this app
Enjoy running endlessly with this fun web app
Running Endless App Running Endless App Distance (in meters) 0 Start Running Stop Running
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>Running Endless App</title>
<meta name="description" content="Enjoy running endlessly with this fun web app">
<meta name="keywords" content="running, endless, web app">
<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">
<link href="https://fonts.googleapis.com/css?family=Poppins:400,700" rel="stylesheet">
<script type="text/javascript">
try {
// App Javascript Goes Here. Place your entire script content inside the try block for error handling.
let distance = 0;
let interval;
// This function updates the distance and displays it on the screen.
function updateDistance() {
distance += 1;
$("#distance").text(distance);
}
// This function starts the running.
function startRunning() {
interval = setInterval(updateDistance, 1000);
$("#startButton").prop("disabled", true);
$("#stopButton").prop("disabled", false);
}
// This function stops the running.
function stopRunning() {
clearInterval(interval);
$("#startButton").prop("disabled", false);
$("#stopButton").prop("disabled", true);
}
// This will run when the DOM is ready.
$(document).ready(function() {
$("#startButton").click(startRunning);
$("#stopButton").click(stopRunning);
});
} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>
<style>
/* App CSS Goes Here */
body {
background-color: #f8f9fa;
font-family: 'Poppins', sans-serif;
}
h1 {
text-align: center;
margin-top: 50px;
color: #343a40;
}
.container {
max-width: 600px;
margin: 0 auto;
padding: 20px;
}
.distance-container {
text-align: center;
margin-bottom: 30px;
}
.distance-label {
font-size: 24px;
font-weight: bold;
color: #343a40;
margin-bottom: 10px;
}
.distance-value {
font-size: 48px;
color: #0d6efd;
margin-bottom: 0;
}
.action-buttons {
text-align: center;
}
.btn {
margin-top: 10px;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<h1>Running Endless App</h1>
<div class="distance-container">
<p class="distance-label">Distance (in meters)</p>
<p id="distance" class="distance-value">0</p>
</div>
<div class="action-buttons">
<button id="startButton" class="btn btn-primary">Start Running</button>
<button id="stopButton" class="btn btn-danger" disabled>Stop Running</button>
</div>
</div>
</body>
</html>
NEW APPS
These are apps made by the community!