How we can build 2 carousels synched using the Thumbs module?
Notice thumbnails are moving as moving the main slider and the active thumbnail is always centered.
Before of Thumbs module we used Controller module but on Swiper 8 doesn't work as expected. Here is an example how worked before.
My actual code for init the sliders that is the one on the official demo but the sliders are not moving together
let swiperThumbs = new Swiper(".mySwiper", {
modules: [Thumbs, Controller],
centeredSlides: true,
slideToClickedSlide: true,
loop: true,
slidesPerView: 5,
});
let swiperSlider = new Swiper(".mySwiper2", {
modules: [Thumbs, Navigation, Controller],
centeredSlides: true,
slidesPerView: 1,
loopedSlides: 6,
loop: true,
navigation: {
nextEl: ".mySwiper2 .swiper-button-next",
prevEl: ".mySwiper2 .swiper-button-prev",
},
thumbs: {
swiper: swiperThumbs,
},
});
Also tried these lines but don't work:
swiperSlider.thumbs.swiper = swiperThumbs;
swiperThumbs.thumbs.swiper = swiperSlider;