Skip to content

Instantly share code, notes, and snippets.

Created January 12, 2016 01:40
Show Gist options
  • Save anonymous/d9dc23ebdf66aac0e16e to your computer and use it in GitHub Desktop.
Save anonymous/d9dc23ebdf66aac0e16e to your computer and use it in GitHub Desktop.
Dot progress // source http://jsbin.com/povohu
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Dot progress</title>
</head>
<body>
<span id="loading-dots"></span>
<script id="jsbin-javascript">
var x = 0;
setInterval(function() {
var dots = "";
x++;
for (var y = 0; y < x % 4; y++) {
dots += ".";
}
document.getElementById("loading-dots").innerHTML = dots;
}, 500);
</script>
<script id="jsbin-source-javascript" type="text/javascript">var x = 0;
setInterval(function() {
var dots = "";
x++;
for (var y = 0; y < x % 4; y++) {
dots += ".";
}
document.getElementById("loading-dots").innerHTML = dots;
}, 500);</script></body>
</html>
var x = 0;
setInterval(function() {
var dots = "";
x++;
for (var y = 0; y < x % 4; y++) {
dots += ".";
}
document.getElementById("loading-dots").innerHTML = dots;
}, 500);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment