// Fix bug with product image color loading on firefox

This commit is contained in:
mDeflotte committed 2012-02-14 15:36:11 +00:00
1 parent 9cd2b4e3d9
commit 02f581c858
1 file changed
+6 -3
+6 -3
View File
@@ -121,7 +121,7 @@ function findCombination(firstTime)
//show the large image in relation to the selected combination //show the large image in relation to the selected combination
if (combinations[combination]['image'] && combinations[combination]['image'] != -1) if (combinations[combination]['image'] && combinations[combination]['image'] != -1)
displayImage( $('#thumb_'+combinations[combination]['image']).parent() ); displayImage($('#thumb_'+combinations[combination]['image']).parent(), firstTime);
//show discounts values according to the selected combination //show discounts values according to the selected combination
if (combinations[combination]['idCombination'] && combinations[combination]['idCombination'] > 0) if (combinations[combination]['idCombination'] && combinations[combination]['idCombination'] > 0)
@@ -420,14 +420,17 @@ function updateDisplay()
} }
//update display of the large image //update display of the large image
function displayImage(domAAroundImgThumb) function displayImage(domAAroundImgThumb, no_animation)
{ {
if (typeof(no_animation) == 'undefined')
no_animation = false;
if (domAAroundImgThumb.attr('href')) if (domAAroundImgThumb.attr('href'))
{ {
var newSrc = domAAroundImgThumb.attr('href').replace('thickbox','large'); var newSrc = domAAroundImgThumb.attr('href').replace('thickbox','large');
if ($('#bigpic').attr('src') != newSrc) if ($('#bigpic').attr('src') != newSrc)
{ {
$('#bigpic').fadeOut('fast', function(){ $('#bigpic').fadeOut((no_animation ? 0 : 'fast'), function(){
$(this).attr('src', newSrc).show(); $(this).attr('src', newSrc).show();
if (typeof(jqZoomEnabled) != 'undefined' && jqZoomEnabled) if (typeof(jqZoomEnabled) != 'undefined' && jqZoomEnabled)
$(this).attr('alt', domAAroundImgThumb.attr('href')); $(this).attr('alt', domAAroundImgThumb.attr('href'));