Skip to content

Instantly share code, notes, and snippets.

@davelnewton
Created September 9, 2011 02:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davelnewton/1205384 to your computer and use it in GitHub Desktop.
Save davelnewton/1205384 to your computer and use it in GitHub Desktop.
Speedy
<html>
<head>
<script type="text/javascript" charset="utf-8" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js">
</script>
</head>
<body>
Speed: <span id="speed"></span>
</body>
<script type="text/javascript" charset="utf-8">
function getSpeed() {
return Math.floor(Math.random() * 70) + 5;
}
function goSpeedRacerGo() {
$("#speed").text(getSpeed());
setTimeout("goSpeedRacerGo()", 750);
}
goSpeedRacerGo();
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment