Skip to content

Instantly share code, notes, and snippets.

@zekesonxx
Created February 16, 2015 01:48
Show Gist options
  • Save zekesonxx/a68e3fe39414783687c4 to your computer and use it in GitHub Desktop.
Save zekesonxx/a68e3fe39414783687c4 to your computer and use it in GitHub Desktop.
dmv.org is bullshit
$(document).ready(function(){
var rand = Math.floor(Math.random()*10);
var stat = [0,1,4,rand,5,0];
for(var i = 0; i<stat.length; i++) {
$('#statistic li').eq(i).html(stat[i]);
}
setInterval(function(){incrementNumber(stat)},10000);
});
function incrementNumber(numArray) {
var last = numArray[(numArray.length-1)];
if(last <9) {
last = last + 1;
} else {
last = 0;
}
numArray[(numArray.length-1)] = last;
$('#statistic li').eq(numArray.length-1).html(numArray[numArray.length-1]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment