[英]jQuery fancybox multiple album
I'm trying to use the FancyBox to create an album in a single click, that is, to open me "N" of images each you see that I click on each picture, do not know how to do this if via JS, internet search and many options but not achieved anything yet... 我正在尝试使用FancyBox一键创建一个专辑,也就是说,打开我的“N”个图像,每个你看到我点击每张图片,如果通过JS,互联网不知道如何做到这一点搜索和许多选项,但尚未实现任何...
I do not want to open an image with a single click but open several to see an album 我不想只需点击一下即可打开图像,但可以打开几张图像来查看相册
here is my code: 这是我的代码:
<aside class="row">
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
<article class="album">
<h3>Galería</h3>
<a class="fancybox" rel="gallery1" href="http://farm2.staticflickr.com/1617/24108587812_6c9825d0da_b.jpg">
<figure>
<img src="assets/own/images/galeria/test_pic_gallery.png" alt="" />
</figure>
</a>
</article>
</div>
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
<article class="album">
<h3>Galería</h3>
<a class="fancybox" rel="gallery2" href="http://farm2.staticflickr.com/1617/24108587812_6c9825d0da_b.jpg">
<figure>
<img src="assets/own/images/galeria/test_pic_gallery.png" alt="" />
</figure>
</a>
</article>
</div>
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
<article class="album">
<h3>Galería</h3>
<a class="fancybox" rel="gallery3" href="http://farm2.staticflickr.com/1617/24108587812_6c9825d0da_b.jpg">
<figure>
<img src="assets/own/images/galeria/test_pic_gallery.png" alt="" />
</figure>
</a>
</article>
</div>
If you group your images using the red
attribute, that will allow you to open one image and scroll through your gallery images. 如果使用
red
属性对图像进行分组,则可以打开一个图像并滚动浏览图库图像。 At the moment you have rel="gallery1", rel="gallery2", etc. Change that to: rel="gallery1"
for every image. 目前你有rel =“gallery1”,rel =“gallery2”等。将其更改为:
rel="gallery1"
为每个图像。
I am sorry to keep answeting instead of commenting (not enough street cred). 我很遗憾继续回答而不是评论(没有足够的街头信誉)。 Do you have sample code?
你有示例代码吗?
Something like this: 像这样的东西:
$(".fancybox").fancybox({ //stuff here... });
Well, I found a solution i don't know is the most better but is working adding the class hidden at link class="fancybox hidden"
to the others elements but the same album 好吧,我找到了一个我不知道是最好的解决方案,但是正在将隐藏在链接
class="fancybox hidden"
的类添加到其他元素但是相同的专辑中
<a class="fancybox" rel="gallery1" href="assets/own/images/1.jpg" title="album 1/1">
<figure>
<img src="assets/own/images/galeria/test_pic_gallery.png" alt="" />
</figure>
</a>
<a class="fancybox hidden" rel="gallery1" href="assets/own/images/2.jpg" title="album 1/2"></a>
<a class="fancybox hidden" rel="gallery1" href="assets/own/images/3.jpg" title="album 1/3"></a>
<a class="fancybox hidden" rel="gallery1" href="assets/own/images/4.jpg" title="album 1/4"></a>
and this work for the others albums too... 而这项工作也适用于其他专辑......
<a class="fancybox" rel="gallery2" href="assets/own/images/6.jpg" title="album 2/1">
<figure>
<img src="assets/own/images/galeria/test_pic_gallery.png" alt="" />
</figure>
</a>
<a class="fancybox hidden" rel="gallery2" href="assets/own/images/5.jpg" title="album 2/2"></a>
<a class="fancybox hidden" rel="gallery2" href="assets/own/images/4.jpg" title="album 2/3"></a>
<a class="fancybox hidden" rel="gallery2" href="assets/own/images/3.jpg" title="album 2/4"></a>
here es the example online: Galleria working 这里是网上的例子: Galleria工作
is working for the titles at bottom into the images... 正在为图片底部的标题工作......
and here is the other soluction by the Fancybox 这是Fancybox的另一个解决方案
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.