D
D
DotDash2018-03-30 14:31:37
JavaScript
DotDash, 2018-03-30 14:31:37

How to make gallery view when opening Fancybox image?

Example
There is a block with a link to 2 images, they are opened via fancybox.
There are many more photos in the gallery.
When you click on one of the images in the thumbnails, all the photo galleries should be shown (in the example it works on the Open button)
For now, it only works on the Open button, but how can I do this on images?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nikolai Gavrilovich, 2018-03-30
@DotDash

Here is the fancybox dock, everything is written
there fancyapps.com/fancybox/3/docs/#images You
hide the necessary images with css and add data-fancybox="images" to them, and also data-fancybox="images" to the visible image. Bottom line: when you click on a visible image, the thumbnails will display all images with the data-fancybox="images" attribute. If you need pictures to open different galleries, then you add different attributes (data-fancybox="images", data-fancybox="images2")

T
Talyan, 2018-03-30
@flapflapjack

Well, without the code, how can we help you?
Give each image the same .onclick as your working button. What is the problem?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question