
JavaScript/실전
Swiper 예제 - Swiper 2개 연동
웹사이트를 만들다보면 Swiper 2개를 연동해야 하는 상황이 발생할 수 있다. 여기서 말하는 연동이란, A 슬라이더를 여러 방법으로 동작할 때, B 스와이퍼도 움직이는 것을 말한다. 마찬가지로 B 슬라이더를 움직이더라도 A 슬라이더가 함께 움직이는 것도 포함한다. 최종 결과물 기본 구조 HTML CSS .swiper-container { width: 600px; text-align: center; } .swiper-container img { width: 100%; } JavaScript var MainSwiper = new Swiper('.main_swiper .swiper-container'); var SubSwiper = new Swiper('.sub_swiper .swiper-container'..