2013-11-02, 04:41:23
(2013-11-02, 04:01:01)Martin Wrote:(2013-11-01, 19:14:35)mvlcek Wrote:(2013-11-01, 07:36:55)Martin Wrote: My question:
Normally you open a gallery by clicking on the thumb/s created by the gallery.
Is there a possibility (or workaround) to open a gallery with a link in a text or a picture (not from the gallery)?
For Fancybox you can use e.g.
Code:<a href="#" onclick="$('.gallery-thumb a').eq(0).trigger('click'); return false;">Open Gallery</a>
Hi mvlcek – thanks for your fast help.
I tried it and it works fine – also with prettyphoto.
It is also nice, that I can open the gallery with an defined picture: eq(x)
Excuse me for 2 more questions:
1. is it possible to use filtering (tags=x), when I open a gallery with such a link?
2. can I open the gallery with a special picture defined by the name of the picture (xxx.jpg (thumb or big one)) and not by number?
Thanks again!
1. no
2. Fancybox:
Code:
<a href="#" onclick="$('.gallery-thumb a[name=MyPictureName]').trigger('click'); return false;">Open Gallery</a>
Code:
<a href="#" onclick="$('.gallery-thumb img[alt=MyPictureName]').trigger('click'); return false;">Open Gallery</a>