From a98e4cc14494170f95a3497a95d59d38b4fbcb36 Mon Sep 17 00:00:00 2001 From: Rolux Date: Sat, 20 Feb 2010 21:40:11 +0530 Subject: [PATCH] improving loading icon --- build/js/ox.ui.js | 13 +++++++------ demos/test/index.html | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/build/js/ox.ui.js b/build/js/ox.ui.js index ff46832..24e205d 100644 --- a/build/js/ox.ui.js +++ b/build/js/ox.ui.js @@ -3282,23 +3282,24 @@ requires self.deg = 0; self.count++; if (self.count == 1) { + that.animate({ + opacity: 1 + }, 250); self.interval = setInterval(function() { self.deg = (self.deg + 30) % 360; update(); }, 83); - that.animate({ - opacity: 1 - }, 250); } }; that.stop = function() { self.count--; if (self.count == 0) { - clearTimeout(self.interval); - self.deg = 0; that.animate({ opacity: 0 - }, 250); + }, 250, function() { + clearTimeout(self.interval); + self.deg = 0; + }); } } return that; diff --git a/demos/test/index.html b/demos/test/index.html index 8decaf2..f548c0c 100644 --- a/demos/test/index.html +++ b/demos/test/index.html @@ -103,7 +103,7 @@ "Italy", "Japan", "Spain", - "Swizerland", + "Switzerland", "UK", "USA" ],