From 41b5fb5408b8a154a4016d38286941258303fe3d 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 ff46832f..24e205d1 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 8decaf26..f548c0cb 100644 --- a/demos/test/index.html +++ b/demos/test/index.html @@ -103,7 +103,7 @@ "Italy", "Japan", "Spain", - "Swizerland", + "Switzerland", "UK", "USA" ],