swiper 마우스 오버 시 멈춤
본문
안녕하세요! swiper slide 가 마우스 오버했을 때 멈추게 하는 방법 부탁드립니다..ㅠㅠ!!
어떤 것을 추가해야 하나요..?
new Swiper("#mainVisual .swiper-container",{
effect:"slide",
speed:5000,
loop:true,
autoplay: {delay:2000
},
navigation:{
prevEl:"#mainVisual .btnPrev",
nextEl:"#mainVisual .btnNext"
},
pagination: {
el: "#mainVisual .pagination",
clickable:true
},
})
답변 1
$(".swiper-container").each(function(elem, target){
var swp = target.swiper;
$(this).hover(function() {
swp.autoplay.stop();
}, function() {
swp.autoplay.start();
});
});
답변을 작성하시기 전에 로그인 해주세요.