From 4f1398e0a5a8dd23dd5d2cc9bd73f7af70c1d440 Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Mon, 17 Feb 2014 09:06:54 -0500 Subject: stuff --- www/css/index.css | 1 + www/js/html5ks.js | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'www') diff --git a/www/css/index.css b/www/css/index.css index e0136c1..b94f40d 100644 --- a/www/css/index.css +++ b/www/css/index.css @@ -338,6 +338,7 @@ input[type="checkbox"]:checked + span:before { } .spinner { + display: none; opacity: 0; -webkit-transition: opacity 2s; transition: opacity 2s; 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); -- cgit v1.2.3-54-g00ecf