Answer the question
In order to leave comments, you need to log in
Why does the image shrink when clicking on a clone element when using Owl Carousel 2 and Fancybox 3?
I use Fancybox along with Owl Carousel, everything is reflected on this page https://codepen.io/Oganez09/pen/yLzPxQG
In short, the main problem is because of the clones that owl carousel creates, in the example everything works correctly except for one. When opening an image, scaleToActual is used to immediately open it to full width, this 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.
First, when I clicked on the clone element, I used $.fancybox.close(), it reduced the image with each click, when I changed it to $.fancybox.destroy(), it began to do this only once, and all subsequent openings occur as usually correct.
What can be done about it?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question