[*] FO : Wait for the image to be loaded before displaying the big image on product page - thanks to @romainberger

This commit is contained in:
vAugagneur
2013-04-22 09:40:48 +02:00
parent 2cde30c118
commit 50528a5fe3
+5 -3
View File
@@ -422,9 +422,11 @@ function displayImage(domAAroundImgThumb, no_animation)
var newSrc = domAAroundImgThumb.attr('href').replace('thickbox', 'large');
if ($('#bigpic').attr('src') != newSrc)
{
$('#bigpic').attr('src', newSrc);
if (typeof(jqZoomEnabled) != 'undefined' && jqZoomEnabled)
$('#bigpic').attr('rel', domAAroundImgThumb.attr('href'));
$(this).attr('src', newSrc).load(function() {
$(this).show();
if (typeof(jqZoomEnabled) != 'undefined' && jqZoomEnabled)
$(this).attr('alt', domAAroundImgThumb.attr('href'));
});
}
$('#views_block li a').removeClass('shown');
$(domAAroundImgThumb).addClass('shown');