swiper內部有個橫向滾動的盒子
由於swiper滾動,導致滾動盒子的時候自動跳到了下一頁
wiper提供一個 noSwipingClass的屬性,用來阻止自帶的滾動事件
window.mySwiper = new Swiper('#Jswiper', {
direction: 'vertical',
mousewheelControl: true,
speed: 700,
initialSlide: 0,
autoplay: false,
loop: false,
touchMoveStopPropagation: false,
noSwipingClass : 'J_scroll',
nextButton: '.icon-btn',
onInit: function() {
},
onTransitionStart: function(mySwiper) {
if (mySwiper.activeIndex == ($('.part').length - 1)) {
$(".icon-btn").hide();
} else {
$(".icon-btn").show();
}
}
});
