0

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>
4

1 回答 1

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

于 2013-01-08T21:02:12.650 回答