2017-11-06 12 views
0

내가 그 슬라이더가있을 때 슬라이딩 :Swiper 슬라이더는 여전히 내가 그 위에 cick하고있어

<div class="module mw2 mh2"> 
    <div class="swiper-2 swiper-module swiper-ap-1 swiper-home swiper-container-horizontal" style="cursor: -webkit-grab;"> 
     <div class="swiper-wrapper"> 
      <?php foreach ($slider_secondary as $image_info) { ?> 
      <a class="swiper-slide bg op8 mp-gallery-1" data-background="<?php echo $image_info['image']; ?>" href="image/<?php echo $image_info['image_unresized']; ?>" title="<?php echo $image_info['titles'][$language_id]; ?>"></a> 
      <?php } ?> 
     </div> 
     <!-- /swiper-wrapper --> 

    <!-- Add Pagination --> 
    <div class="swiper-ap-1-pag swiper-home-pagination swiper-pagination-fraction"></div> 
    <!-- Add Arrows --> 
    <div class="swiper-ap-1-nb swiper-home-button-next"></div> 
    <div class="swiper-ap-1-pb swiper-home-button-prev"></div> 
</div> 
<!-- module 2 --> 
</div> 

을하고는 JS. 그리고 몇 초 동안 멈추지 만 슬라이더를 계속 움직이면 여전히 그림이 바뀝니다. 사진에서 나는이 두 이미지 사이에서 일시 중지되었지만 여전히 슬라이딩하는 슬라이더입니다. enter image description here

답변

0
$(".swiper-ap-1").hover(function(){ 
    this.swiper.stopAutoplay(); 
}, function(){ 
    this.swiper.startAutoplay(); 
});