diff --git a/source/Ox.UI/js/Core/ImageElement.js b/source/Ox.UI/js/Core/ImageElement.js index 0f1b2863..cc250ba9 100644 --- a/source/Ox.UI/js/Core/ImageElement.js +++ b/source/Ox.UI/js/Core/ImageElement.js @@ -32,6 +32,7 @@ Ox.ImageElement = function(options, self) { width: self.options.width, height: self.options.height }) + .start() .appendTo(that); loadImage(); @@ -42,7 +43,10 @@ Ox.ImageElement = function(options, self) { self.$image.off({load: showImage}).remove(); } self.$image = $('') - .one({load: showImage}) + .one({ + error: stopLoading, + load: showImage + }) .attr({src: self.options.src}); } @@ -60,10 +64,14 @@ Ox.ImageElement = function(options, self) { } function showImage() { - self.$screen.remove(); + self.$screen.stop().remove(); self.$image.appendTo(that); } + function stopLoading() { + self.$screen.stop(); + } + that.css = function(css) { that.$element.css(css); self.$screen && self.$screen.css(css);