FancyBox 2.1.4/jQuery-我可以使用一个缩略图链接到照片库吗? [英] FancyBox 2.1.4 / jQuery - Can I use one Thumbnail to link to Photo Gallery?

查看:72
本文介绍了FancyBox 2.1.4/jQuery-我可以使用一个缩略图链接到照片库吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用FancyBox 2.1.4和jQuery,

I'm using FancyBox 2.1.4 and jQuery,

在HTML页面上是否只能有一个缩略图指向整个FancyBox照相馆,该照相馆由多张照片组成?

Is it possible to have only one Thumbnail on an HTML Page that points to an entire FancyBox Photo Gallery that consists of more than one photo?

因此,当单击该缩略图时,它将在现有的HTML页面上方启动一个FancyBox照片库.

So when one click on that one Thumbnail it will launch a FancyBox Photo Gallery over the existing HTML Page that can be viewed.

默认情况下,一个HTML页面上需要所有缩略图,如果您单击其中任何一个,它将打开该缩略图,您可以单击向左或向右查看其他照片.

By default one needs all the Thumbnails on the one HTML Page and if you then click any one it will open that one and you can click Left or Right to view the other photos.

我的逻辑背后:在HTML页面上有信息.关于某个地方(住宅综合楼)的信息,在该页面上,我只想放置一个缩略图并将其命名为综合楼的图片库",因此当有人单击该缩略图时,它将启动FancyBox图片库幻灯片,其中包含所有照片

My logic behind this: On the HTML Page there's info. about a place (a residential complex), and on that page I want to place only one Thumbnail and call it "Photo Gallery of the Complex", so when someone clicks on that one Thumbnail it launches the FancyBox Photo Gallery Slideshow with all the photos.

感谢您的帮助,

Reinhard.

推荐答案

我知道我晚了2个月,但是我遇到了类似的情况,需要解决,尽管FancyBox网站上的示例很有用,将所有这些指向图像的链接都隐藏起来(隐藏页面负担!)是不切实际的.

I know I'm 2 months late to the party, but I had a similar situation that needed worked out and while the example on the FancyBox website is useful, it's a bit impractical to include all those links to images only to hide them (look out for a heavy page load!).

我做了一些调整,发现真正需要的只是带有rel属性的<a>标记.我整理了该示例,删除了为所有内容添加相同rel属性的js,并添加了另一个图库以展示其工作方式: http: //jsfiddle.net/uZCC6/3005/

I did some tweaking and noticed that all that's really needed is the <a> tags with the rel attribute. I cleaned up the example, removing the js that adds the same rel attribute to everything, and adding another gallery to show how it could work: http://jsfiddle.net/uZCC6/3005/

希望这对其他人有帮助!

Hope this helps anyone else!

这篇关于FancyBox 2.1.4/jQuery-我可以使用一个缩略图链接到照片库吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆