This is a (multiple allowed):
let slider = new window.swiper(element, {
init: false,
direction: 'horizontal',
loop: true,
slidesPerView: 4,
slidesPerGroup: 4,
spaceBetween: 8,
preloadImages: false,
lazy: true,
observer: true,
observeParents: true,
navigation: {
nextEl: '#' + this.sliderId + ' .swiper-button-next',
prevEl: '#' + this.sliderId + ' .swiper-button-prev',
},
breakpoints: {
1100: {
slidesPerView: 3,
slidesPerGroup: 3
},
850: {
slidesPerView: 2,
slidesPerGroup: 2
},
550: {
slidesPerView: 1,
slidesPerGroup: 1
}
},
});
slider.on('init', () => { this.loaded = true; });
slider.init();
It's the same problem as described here:
Event handlers in repeated slides should work
The event is not firing. It is just triggering for not repeated slides. Same thing is happening if I click on the next button after the last slide.
Add events considering there are repeated slides, e.g. using live events