-
-
Save bouveng/56d4b836b3ba162d7b78 to your computer and use it in GitHub Desktop.
ascii ajax spinner, jquery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
var spins = [ | |
"←↖↑↗→↘↓↙", | |
"▁▃▄▅▆▇█▇▆▅▄▃", | |
"▉▊▋▌▍▎▏▎▍▌▋▊▉", | |
"▖▘▝▗", | |
"┤┘┴└├┌┬┐", | |
"◢◣◤◥", | |
"◰ ◳ ◲ ◱", | |
"◴◷◶◵", | |
"◐◓◑◒", | |
"|/-\\"]; | |
var spin = spins[0], | |
title$ = $('title'), | |
i=0; | |
setInterval(function() { | |
i = i==spin.length-1 ? 0 : ++i; | |
title$.text('('+ spin[i] +') Loading...'); | |
},300); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment