Closed Oganez09 closed 2 years ago
Hi,
See https://web.archive.org/web/20210325170940/https://fancyapps.com/fancybox/3/docs/#faq-6
I would suggest upgrading to the latest Fancybox, where Carousel is available out of the box and it is very easy to integrate and customize, see https://fancyapps.com/playground/1yW As you can see, it also works much smoother.
I am using Fancybox together with Owl Carousel, everything is reflected in this page https://codepen.io/Oganez09/pen/yLzPxQG
In short, the main problem is due to the clones that owl carousel creates, for example everything works correctly except one. When opening a picture, scaleToActual is used so that it immediately opens to its full width, it works, but if you click on the clone element, it first opens as it should, and then returns back to its normal state, i.e. decreases.
At first, when I clicked on a clone element, I used $ .fancybox.close(), it reduced the picture with each click, but when I changed it to $ .fancybox.destroy(), it began to do it only once, and all subsequent openings occur as usually correct.
What can you do about it?