【问题标题】:Jquery Load Thumbnails w/ CloudZoom带有 CloudZoom 的 Jquery 加载缩略图
【发布时间】:2012-06-11 19:57:10
【问题描述】:

我在将缩略图加载到 div 中然后对其使用云缩放时遇到问题,基本上 html 是这样的:

是这样的:

<!-- The Original Image -->
<p class="product-image product-image-zoom replace">
<a class="cloud-zoom" id="zoom1" href="src/to/img.jpg" rel="adjustX: 10, adjustY:-4">
<img id="" src="src/to/img.jpg" />
</a>
</p>


<div class="more-views">
   <ul>
    <li>
        <a href=""><img class="image-rollover" src="source/to/img.jpg" width="67" height="67"/></a>
    </li>
     <li>
        <a href=""><img class="image-rollover" src="source/to/img.jpg" width="67" height="67"/></a>
    </li>
     <li>
        <a href=""><img class="image-rollover" src="source/to/img.jpg" width="67" height="67"/></a>
    </li>
</ul>

这是我用来将每个缩略图加载到主 img 标签中的 jquery:

jQuery('.image-rollover').hover(function() {
jQuery('.replace img').attr("src", this.src);
jQuery('.zoom').attr("href", this.src);
});

我也在主图像上使用云缩放:

<script type="text/JavaScript" src="<?php echo $this->getSkinUrl('js/cloud-zoom.1.0.2.min.js') ?>"></script>

所以这是我的问题:缩略图可以加载到 div 中,但是每次我将鼠标悬停在新加载的缩略图上时,都会出现云缩放,但仍然显示初始图像,有没有办法让我获得云缩放以显示当前加载的图像?

一只忙碌的猫:
http://beta2.stocksale.ca/picture.png(需要在那里登录)

请帮忙!!!啊啊啊!!!

【问题讨论】:

  • 来吧,没人能帮上忙!?请让我绝望!

标签: jquery zooming


【解决方案1】:

我遇到了类似的问题。再次尝试调用 .CloudZoom...

jQuery('.image-rollover').hover(function() {
jQuery('.replace img').attr("src", this.src);
jQuery('.zoom').attr("href", this.src);
jQuery('.cloud-zoom').CloudZoom();
});

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-05-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-10-02
    • 2012-06-17
    相关资源
    最近更新 更多