3

我想在这里实现三件事,即

  1. 灯箱
  2. 缩略图滑块
  3. 云变焦

我能够使 3) 云缩放和 2) 缩略图滑块正常工作,但我不确定如何将滑块中的缩略图链接到主显示图像并弹出正确的选择。

任何人都可以发光吗?提前致谢!

我在顶部声明了这一点:

<pre>$document->addScriptDeclaration("     
jQuery(document).ready(function() {
     jQuery('#flexible-zoom-additionalImagesWrap').jCarouselLite({
                btnNext: '.next',
                btnPrev: '.prev',
                visible: 2,
                scroll: 1,
                circular: false             
                 });     
  });

jQuery(document).ready(function() { 
    jQuery('.flexibleGallery').colorbox({rel:'flexibleGallery'});
   });   

jQuery.fn.flexibleZoom.defaults = {
        position: 'right',
        zoomWidth: '360',
        zoomHeight: '470',
        lensOpacity: 0.5, 
        smoothMove: 7,
        adjustX: 10,
        adjustY: 0,
        showTitle: true,        
    }; 
");
</pre>

这里是 html/php 代码

<?php // Product Main Image
if (!empty($this->product->images[0])) {
?>
<div class="main-image">
  <?php 
echo $this->product->images[0]->displayMediaFull('class="medium-image modal" id="medium-image"', true, 'class="flexible-zoom"', true, 'alt="Zoom Type 1: Standard"', true); ?>
</div>
<div class="flexible-zoom-magnify"> <a id="flexible_lightbox" class="flexibleGallery"> <span class="flexible-zoom-magnify"></span> </a> </div>
<?php } // Product Main Image END ?>

<?php
// Showing The Additional Images
if (!empty($this->product->images) and count ($this->product->images)>1) {
    ?>
<div class="additional-images"> 
  <?php          
     // Product Images slider    
     if($this->product->images[0]->virtuemart_media_id!=0 && count($this->product->images)>0)  {
        echo " < div id=\"flexible-zoom-additionalImagesWrap\" class=\"flexible-zoom-additionalImagesWrap\">";      
        echo " <div class=\"more-views-arrow prev\">
</div>";        
        echo " <div class=\"flexible-zoom-additionalImages\">";
         echo "<ul class=\"additionalImagesslider\">";
         foreach($this->product->images as $a=>$b){
            $imgsrc = JURI::root().$b->file_url;
            $imgsrc_thumb = JURI::root().$b->file_url_thumb;    
            echo "<li class=\"flexible-zoom-additionalImages-slide\">
            <a name=\"$imgsrc_thumb\"  rel=\"useZoom: 'zoom1', smallImage: '$imgsrc_thumb\" class=\"flexible-zoom-gallery\" href=\"".$imgsrc."\">
            <img class=\"zoom-tiny-image-additional\" src=\"".$imgsrc_thumb."\"/>
            </a>
            <a class=\"flexibleGallery cboxElement\" href=\"".$imgsrc."\"></a>
            </li>";
         }       
         echo "</ul>";
         echo "</div>";
        echo "<div class=\"more-views-arrow next\"></div>";     
         echo "</div>";  }
     ?>
  <div class="clear"></div>
</div>
<?php
} // Showing The Additional Images END ?>
4

1 回答 1

0

我有一个我认为你想要的实时实施工作。看看这里

我有一个可以在鼠标悬停时放大的主图像,主图像下方最多 6 个缩略图,单击时将显示为主图像,并且在主图像下方有一个链接,可单击以在灯箱中放大。甚至可以让缩略图成为代替主图像播放的视频。

于 2013-03-25T03:02:11.947 回答