开发者

JQuery Lightbox - grouping images which are not a link

开发者 https://www.devze.com 2023-02-05 15:29 出处:网络
Here is what I want to achieve. I am creating a simple online shop which displays a product grid.If I click on the photo of the product it should open up a lightbox window.However I want to be able t

Here is what I want to achieve.

I am creating a simple online shop which displays a product grid. If I click on the photo of the product it should open up a lightbox window. However I want to be able to click Next and Prev to view images in the same gallery, however these other images in this gallery is not actually displayed on the webpage itself.

So I want to subgroup an image开发者_StackOverflow社区 gallery from a single img link from the webpage. Is this possible?


Try adding all images on the page but display: none all of them except the first one.


You could create some empty anchors in the site, but with the right link in src and group in rel.


I have set up some webpages to show examples of how to use the "slimbox2" lightbox plugin. The site is http://www.trips.elusien.co.uk click on the "slimbox examples" link.

One such example shows how you might do this. Basically, as Marnix said earlier, "put some empty links" on the webpage. Or hide them via CSS "display: none".

Regards Neil


fancybox simply allows you to create a thumbnail wrapped in an anchor and loads the enlarged image on demand.

0

精彩评论

暂无评论...
验证码 换一张
取 消