Moslem7026 Moslem7026 - 3 months ago 16
jQuery Question

Zoom Product for models after ajax update for MULTIPLE IMAGES

using

hotcakecommerce
module for dotnetnuke.zoom image working correctly when product has one image . jquery library used for zoom is
elevateweb.co
. Added Zoom to product view with this tutorial in
product.js
code has been updated also

$('#hcProductImage').attr('src', data.MediumImageUrl);
$('#hcProductImage').attr('data-zoom-image', data.MediumImageUrl);
$('#hcProductImage').elevateZoom({easing : true});
$('#hcSku').html(data.Sku);


data-zoom-image
attrib of image source updated correctly , but zoom show previuse image after change model of product. after changing
data-zoom-image
attrib of image
elevateZoom
function has been called to update zoom . but no cahnged.

Answer

I'm not familiar with hotcake. But I think you have to re-bind the background image of the zoomed DIV.

$('.zoomWindowContainer .zoomWindow').css({ 'background-image': 'url(\'' + data.MediumImageUrl + '\')' });

This probably works best with same size images.

Comments