diff options
Diffstat (limited to 'themes/default/js/thumbnails.loader.js')
-rw-r--r-- | themes/default/js/thumbnails.loader.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/themes/default/js/thumbnails.loader.js b/themes/default/js/thumbnails.loader.js index 9483caeb6..b383b7276 100644 --- a/themes/default/js/thumbnails.loader.js +++ b/themes/default/js/thumbnails.loader.js @@ -11,12 +11,17 @@ function add_thumbnail_to_queue(img, loop) { url: img.data('src'), data: { ajaxload: 'true' }, dataType: 'json', + beforeSend: function(){jQuery('.loader').show()}, success: function(result) { img.attr('src', result.url); + jQuery('.loader').hide(); }, error: function() { if (loop < 3) add_thumbnail_to_queue(img, ++loop); // Retry 3 times + if ( typeof( error_icon ) != "undefined" ) + img.attr('src', error_icon); + jQuery('.loader').hide(); } }); } |