<td class="productinfo_imagebig" width="300">
<script type="text/javascript">
<!--
document.write('<a href="http://examplet.com/images/images_big/test Mat New.jpg" target="_blank" class="imagezoomer" id="image_big" rel="lightbox[group]" title="test Mat" ><img src="images/images_big/test Mat New.jpg" class="img" alt="test Mat" title=" test Mat " width="300" height="200" hspace="0" vspace="0"><br>Click to enlarge<\/a>');
//-->
</script>
<a href="http://examplet.com/images/images_big/test Mat New.jpg" target="_blank" class="imagezoomer" id="image_big" rel="lightbox[group]" style="outline-style: none; text-decoration: none;">
<img src="http://examplet.com/images/images_big/test%20Mat%20New.jpg" class="img" alt="test Mat" width="300" height="200" hspace="0" vspace="0"><br>Click to enlarge
<div class="jqZoomPup" style="position: absolute; border-width: 1px; visibility: visible;"></div>
</a>
<noscript>
<a href="http://examplet.com/images/images_big/test Mat New.jpg" target="_blank" rel="lightbox[group]" title="test Mat">
<img src="images/products/test Mat New.jpg" class="img" alt="test Mat" title=" test Mat " width="300" height="200" hspace="0" vspace="0"></br>
Click to enlarge
</a>
</noscript>
</td>
这是我们使用的代码缩放产品和onclick到灯箱弹出图像这里它只适用于缩放它不适用于灯箱。
任何人都可以帮助我吗?
答案 0 :(得分:0)
使用此
$(document).ready(function() {
// Scan the webpage for all class names of 'thumb' that is seen.
$('.thumb').each(function(){
// For each class name of 'thumb' found, go to the parent item of that thumb and apply the rel attribute.
$(this).parent().attr('rel','lightbox[myGallery]');
});
});