var slider = new Swiper ('#slider', { nextButton: '.swiper-button-next', prevButton: '.swiper-button-prev' }) var thumbs = new Swiper('#thumbs', { centeredSlides: true, spaceBetween: 10, slidesPerView: "auto", touchRatio: 0.2, slideToClickedSlide: true }); slider.params.control = thumbs; thumbs.params.control = slider;