如何使用 jQuery Colorbox 将一组图像保留为单独的画廊?

发布于 2024-12-15 00:12:09 字数 208 浏览 4 评论 0原文

我在 Magento 上安装了 colorbox,作为特定产品线的图像库。现在,当我查看颜色盒时,我会看到一个图库中的所有图像。例如:

A页上的图库1(10张图片) 页面 B 上的图库 2(10 张图像)

在页面 A 或页面 B 上,我在 Colorbox 图像库中看到 20 张图像。

如何让 Colorbox 只显示 A 页上对应的 10 张图像?

I have colorbox installed on Magento to serve as image galleries for specific product lines. Now, when I view the colorbox, I see all of the images in one gallery. For instance:

Gallery 1 (10 images) on Page A
Gallery 2 (10 images) on Page B

On either Page A or Page B, I see 20 images within the Colorbox Image Gallery.

How do I make Colorbox only show the 10 images that correspond on Page A?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一曲爱恨情仇 2024-12-22 00:12:09

图像通过锚元素 rel 属性进行分组,或者通过仅选择要分组在一起的元素并为 colorbox 提供 rel 属性来对它们进行分组。例子:

$('#pageA a.photo').colorbox({rel: 'pageA'});

Images are grouped by either the anchor elements rel attribute, or by selecting just the elements you want grouped together and give colorbox a rel property for them. Example:

$('#pageA a.photo').colorbox({rel: 'pageA'});
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文