Code:
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="initial-scale = 1.0, user-scalable = no" />
<meta name="apple-mobile-web-app-capable" content="YES" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection" content="telephone=no" />
<style>
body {}
.placeit {font-size:26px;}
</style>
</head>
<body>
<div class="placeit"><span id="numbers">0</span><sup>%</sup></div>
<div class="placeit"><span id="numbersTwo">0</span><sup>%</sup></div>
<script type="text/javascript" charset="utf-8">
window.onload = function(){setTimeout(function(){
var nums = document.getElementById('numbers');
var numsTwo = document.getElementById('numbersTwo');
var value = parseFloat(nums.innerHTML);
var valueTwo = parseFloat(numsTwo.innerHTML);
var timeoutTimer = 25;
var timeoutTimerTwo = 30;
function scrollUp() {
// the top value in the y-axis
if(value < 49) {
value += 1;
document.getElementById('numbers').innerHTML = value.toFixed(1);
if(value < 49) {
// timeoutTimer will get reduced to zero
// if needed put in a check and a min value
countdown = setTimeout(scrollUp, timeoutTimer);
}
}
}
function scrollUpTwice() {
// the top value in the y-axis
if(valueTwo < 98) {
valueTwo += 1;
document.getElementById('numbersTwo').innerHTML = valueTwo.toFixed(1);
if(valueTwo < 98) {
// timeoutTimer will get reduced to zero
// if needed put in a check and a min value
countdown = setTimeout(scrollUpTwice, timeoutTimerTwo);
}
}
}
setTimeout(scrollUp, 1500);scrollUpTwice();
}, 1000);}
</script>
</body>
</html>
Bookmarks