Magnific-popup: tCounter not displaying the correct number of images

Created on 20 Jan 2016  路  6Comments  路  Source: dimsemenov/Magnific-Popup

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.

Most helpful comment

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.

All 6 comments

Hello,
I have the same issue with multiple galleries in flexslider.
For 14 images, the tCounter starts at 15 and shows a count of 42.

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...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

samholmes picture samholmes  路  5Comments

apasho picture apasho  路  4Comments

raffeb picture raffeb  路  6Comments

ghost picture ghost  路  5Comments

BorislavZlatanov picture BorislavZlatanov  路  4Comments