我正在使用highslide,并希望有一个页面上有许多小画廊,涵盖不同的主题。我有一个完美的画廊,但是当我创建更多的画廊时,来自所有不同画廊的图像显示在一个拇指夹中。我怎样才能确保画廊保持独立?我确信这非常简单,但我正在努力。
目前我的前两个图库代码如下:
<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>
编辑: 我现在已经弄明白了。我只需要在配置区域中设置几个新的选项集,如下所示:
var miniGalleryOptions1 = {
thumbnailId: 'thumb1',
slideshowGroup: 1
}
var miniGalleryOptions2 = {
thumbnailId: 'thumb2',
slideshowGroup: 2
}
然后将返回的hs.expand(this,miniGalleryOptions2)代码更改为相关的库。
答案 0 :(得分:0)
供将来参考 - 请参阅此Highslide常见问题解答:How do I put more than one gallery in the same page?