首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >具有缩略图的多个Highslide图库

具有缩略图的多个Highslide图库
EN

Stack Overflow用户
提问于 2013-07-02 20:24:31
回答 1查看 811关注 0票数 0

我正在使用highslide,并希望有一个页面上的一些小画廊涵盖了不同的主题。我有一个画廊完美地工作,但当我创建更多的画廊时,所有不同画廊的图像都显示在一个缩略图中。我如何确保画廊是分开的?我相信这是非常简单的,但我正在为它而挣扎。

目前,我的前两个图库代码如下:

代码语言:javascript
复制
<div class="servicebox">
        <h2>Radiators</h2>
      <div class="highslide-gallery">
        <a class='highslide' id="thumb1" href='assets/photos/radiators/01.jpg' title="" onclick="return hs.expand(this, miniGalleryOptions1)">
          <img src='assets/photos/radiators/01_thm.jpg' alt=''/>
        </a>          
      <div class="hidden-container">
        <a class='highslide' href='assets/photos/radiators/02.jpg' title="" onclick="return hs.expand(this, miniGalleryOptions1)">
          <img src='assets/photos/radiators/02_thm.jpg' alt=''/>
        </a>
        <a class='highslide' href='assets/photos/radiators/03.jpg' title="" onclick="return hs.expand(this, miniGalleryOptions1)">
          <img src='assets/photos/radiators/03_thm.jpg' alt=''/>
        </a>
      </div>
      </div>
    </div>

    <div class="servicebox">
        <h2>Bathrooms</h2>
      <div class="highslide-gallery">
        <a class='highslide' id="thumb1" href='assets/photos/bathrooms/01.jpg' title="" onclick="return hs.expand(this, miniGalleryOptions1)">
          <img src='assets/photos/bathrooms/01_thm.jpg' alt=''/>
        </a>          
      <div class="hidden-container">
        <a class='highslide' href='assets/photos/bathrooms/02.jpg' title="" onclick="return hs.expand(this, miniGalleryOptions1)">
          <img src='assets/photos/bathrooms/02_thm.jpg' alt=''/>
        </a>
        <a class='highslide' href='assets/photos/bathrooms/03.jpg' title="" onclick="return hs.expand(this, miniGalleryOptions1)">
          <img src='assets/photos/bathrooms/03_thm.jpg' alt=''/>
        </a>
        <a class='highslide' href='assets/photos/bathrooms/04.jpg' title="" onclick="return hs.expand(this, miniGalleryOptions1)">
          <img src='assets/photos/bathrooms/04_thm.jpg' alt=''/>
        </a>
      </div>
      </div>
    </div>

编辑:我现在已经弄清楚了。我只需要在配置区中设置几个新的选项集,如下所示:

代码语言:javascript
复制
    var miniGalleryOptions1 = {
    thumbnailId: 'thumb1',
    slideshowGroup: 1
}

var miniGalleryOptions2 = {
    thumbnailId: 'thumb2',
    slideshowGroup: 2
}

然后将返回的hs.expand(this,miniGalleryOptions2)代码更改为相关的库。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-07-09 08:38:44

有关将来的参考,请参阅此幻灯片常见问题解答:How do I put more than one gallery in the same page?

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17425565

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档