How to place several identical swiper sliders on a page so that they do not depend on each other. And in order not to write huge code
<code>const mySwiperOne = new Swiper(".mySwiperOne", {
spaceBetween: 10,
navigation: {
nextEl: ".mySwiperOne-next",
prevEl: ".mySwiperOne-prev",
},
simulateTouch:false,
thumbs: {
swiper: {
el: '.mySwiperTwo',
slidesPerView: 7
}
},
effect: 'fade',
fadeEffect: {
crossFade: true
}
});
const mySwiperTwo = new Swiper(".mySwiperTwo", {
spaceBetween: 7,
slidesPerView: 7,
navigation: {
nextEl: ".mySwiperTwo-next",
prevEl: ".mySwiperTwo-prev",
}
});
</code>
<code>const mySwiperOne = new Swiper(".mySwiperOne", {
spaceBetween: 10,
navigation: {
nextEl: ".mySwiperOne-next",
prevEl: ".mySwiperOne-prev",
},
simulateTouch:false,
thumbs: {
swiper: {
el: '.mySwiperTwo',
slidesPerView: 7
}
},
effect: 'fade',
fadeEffect: {
crossFade: true
}
});
const mySwiperTwo = new Swiper(".mySwiperTwo", {
spaceBetween: 7,
slidesPerView: 7,
navigation: {
nextEl: ".mySwiperTwo-next",
prevEl: ".mySwiperTwo-prev",
}
});
</code>
const mySwiperOne = new Swiper(".mySwiperOne", {
spaceBetween: 10,
navigation: {
nextEl: ".mySwiperOne-next",
prevEl: ".mySwiperOne-prev",
},
simulateTouch:false,
thumbs: {
swiper: {
el: '.mySwiperTwo',
slidesPerView: 7
}
},
effect: 'fade',
fadeEffect: {
crossFade: true
}
});
const mySwiperTwo = new Swiper(".mySwiperTwo", {
spaceBetween: 7,
slidesPerView: 7,
navigation: {
nextEl: ".mySwiperTwo-next",
prevEl: ".mySwiperTwo-prev",
}
});