Swiper: Pagination does not work with loop is set to true.

Created on 11 Oct 2017  路  7Comments  路  Source: nolimits4web/swiper

This is a (multiple allowed):

  • [x] bug
  • Swiper Version: 4.0.0
  • Platform/Target and Browser Versions: macOs
  • Webpack: 3.6.0

What you did

When you turn on loop setting, pagination will stop working.

let swiper = new Swiper('.swiper-container', {
    pagination: {
        el: '.swiper-pagination',
        clickable: true,
    },
    loop: true,
    speed: 1500,
    autoplay: {
        enabled: true,
        delay: 5000,
        disableOnInteraction: false,
    }
});

Most helpful comment

I got the same issue on 4.3.0.
The swiper-container is display:none; when new Swiper();.

When container displayed, ".swiper-pagination.swiper-pagination-bullets" is empty node.
And the console did not report any errors.

Then I switched to version 3.4.2,

just changed like
pagination: { el: '.swiper-pagination', },
to
pagination '.swiper-pagination',

then working fine.

All 7 comments

I reproduced this issue on v4.0.1, too.

From what i see here it is working http://idangero.us/swiper/demos/200-infinite-loop.html

I got the same issue on 4.0.7. I suggest to reopen the issue

have the same issue

I got the same issue on 4.3.0.
The swiper-container is display:none; when new Swiper();.

When container displayed, ".swiper-pagination.swiper-pagination-bullets" is empty node.
And the console did not report any errors.

Then I switched to version 3.4.2,

just changed like
pagination: { el: '.swiper-pagination', },
to
pagination '.swiper-pagination',

then working fine.

yes, still can't slide loop

Was this page helpful?
0 / 5 - 0 ratings