Simple Counter
Just screwing around with setTimeout()
by Keith Jeter
HTML
<div class="one">0</div>
<br />
<div class="two">10</div>
JavaScript
var count1 = 0,
count2 = 0;
function countOne (e) {
$('.one').text(count1);
count1 = count1 + 1;
setTimeout(countOne,10);
}
function countTwo (e) {
$('.two').text(count2);
count2 = count2 + 1;
setTimeout(countTwo,1);
}
countOne();
countTwo();