When I click next on the main "hero" swiper slider multiple times (10). The thumbs in view get out of sync and the active thumb is no longer in view.
I am trying to link two swiper sliders together inside a bootstrap modal. The thumbs slider is a vertical two column slider and linked to the main "hero" slider inside the modal.
Scroll down the page and click "view 23 photos" to open the modal. https://transmission.mecum.tv/2019/06/18/milk-money/
const $id = $(this).attr('id');
modalThumbs = new Swiper('#' + $id + ' .gallery-modal-thumbs .swiper-container', {
direction: 'vertical',
observer: true,
observeParents: true,
spaceBetween: 20,
slidesPerColumn: 2,
slidesPerView: 5,
navigation: {
nextEl: '#' + $id + ' .modal-thumb-next button',
prevEl: '#' + $id + ' .modal-thumb-prev button',
},
});
modalHero = new Swiper('#' + $id + ' .gallery-modal-hero .swiper-container', {
loop: true,
observer: true,
observeParents: true,
simulateTouch: false,
spaceBetween: 0,
speed: 500,
navigation: {
nextEl: '#' + $id + ' .modal-hero-next button',
prevEl: '#' + $id + ' .modal-hero-prev button',
},
pagination: {
el: '#' + $id + ' .swiper-pagination',
type: 'fraction',
},
thumbs: {
swiper: gallerySliders[$id].modalThumbs,
},
});
The active thumbnail slide should always be in view.