summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2014-02-17 09:06:54 -0500
committerAlex Xu <alex_y_xu@yahoo.ca>2014-02-17 09:07:14 -0500
commit4f1398e0a5a8dd23dd5d2cc9bd73f7af70c1d440 (patch)
tree22e351d9ff147deca2dc2025304f4a923cab8b1e /www/js
parent0c3b699af570d52bf9f36bc3ac6d9c18bd205ea4 (diff)
downloadhtml5ks-4f1398e0a5a8dd23dd5d2cc9bd73f7af70c1d440.tar.xz
html5ks-4f1398e0a5a8dd23dd5d2cc9bd73f7af70c1d440.zip
stuff
Diffstat (limited to 'www/js')
-rw-r--r--www/js/html5ks.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/www/js/html5ks.js b/www/js/html5ks.js
index 40765e1..f9572b0 100644
--- a/www/js/html5ks.js
+++ b/www/js/html5ks.js
@@ -93,7 +93,16 @@ window.html5ks = {
spin: function (mod) {
clearTimeout(this._spintm);
this._spintm = setTimeout(function () {
- html5ks.elements.spinner.style.opacity = html5ks._spinners === 0 ? 0 : 1;
+ var spinner = html5ks.elements.spinner;
+ if (html5ks._spinners) {
+ spinner.style.display = "block";
+ spinner.style.opacity = 1;
+ } else {
+ spinner.style.opacity = 0;
+ this._spintm = setTimeout(function () {
+ spinner.removeAttribute("style");
+ }, 2000);
+ }
}, 1000);
this._spinners += mod;
console.assert(this._spinners >= 0);