哪个功能控制产品图像变化?

时间:2013-01-05 15:56:17

标签: javascript magento

http://www.wargame-club.com/3-day-molle-assault-backpack-black.html

当我点击大产品图片下的四个产品缩略图图像时,产品图像会发生变化。我发现click标签上没有a功能。它如何使缩略图图像上的产品图像发生变化?谢谢。

<li>
  <a title="" class="cloud-zoom-gallery" rel="popupWin:'http://www.wargame-club.com/catalog/product/gallery/id/24/image/83/', useZoom: 'cloudZoom', smallImage: 'http://www.wargame-club.com/media/catalog/product/cache/6/image/265x265/fa17b1d835a4c57a29916eae7df1805d/A/S/AS043_2.jpg'" href="http://www.wargame-club.com/media/catalog/product/cache/6/image/fa17b1d835a4c57a29916eae7df1805d/A/S/AS043_2.jpg"></a>
</li>

1 个答案:

答案 0 :(得分:0)

当您检查页面并检查javascript文件时,您将转到: http://www.wargame-club.com/js/cjm/colorselectorplus/cloud-zoom.1.0.2.min.js

在此文件中,您将找到以下代码:

 $(this).bind('click', $(this), function (event) {

var data = event.data.data('relOpts');

// Destroy the previous zoom
$('#' + data.useZoom).data('zoom').destroy();

// Change the biglink to point to the new big image.
$('#' + data.useZoom).attr('href', event.data.attr('href'));

// Change the small image to point to the new small image.
$('#' + data.useZoom + ' img').attr('src', event.data.data('relOpts').smallImage);

// Init a new zoom with the new images.
$('#' + event.data.data('relOpts').useZoom).CloudZoom();

}

使用的脚本是: http://www.starplugins.com/cloudzoom