Magnific-Popup
Magnific-Popup copied to clipboard
tCounter not displaying the correct number of images
Hi there, thank you for the amazing script.
I am running into an issue I can't seem to find a solution for though..
At the moment, I have 4 images in a slick slider. By clicking on the images on the slick slider I have them displaying in a bigger size with magnificPopup. All works as expected apart from the tCounter values which for some reason shows a count of 10 images instead of 4, starts the count at 3 instead of 1 and sometimes the slides don't show in the correct order. it starts at 3, shows a total of ten and sometimes it randomly messes up the order.
So the counter should show a count of 4 images as I only have 4 images, start at 1 finish at 4 and the slides should always show in the correct order..
Any help on this would be much appreciated.
Mine starts at 3 and shows a count of 10 images for 4 images .
Anyone willing to help us?
Meanwhile going to keep searching for a solution. If I find one I'll post it here.
Found a solution.
My issue was caused by the slick slider cloned slides.
Solution was to add this bit of code when initializing magnificPopup:
delegate: '.slides:not(.slick-cloned) a',
For flexslider the solution shouldn't be far from this.
Thanks for help
delegate: '.slides:not(.slick-cloned) a',
@Madeirense: if you change the delete to ignore the slick-cloned elements, those are no longer clickable, correct?
Running into this issue myself...
@Madeirense
That won't work, as @AdamWills said. It will disable clicking the cloned items. It may look like it works because you're probably clicking on the non-cloned ones.
One "solution" is to just set infinite: false
on the slick slider, but that kinda sucks...
Facing the same issue.