swiper内容滚动太长滚动Bug

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();
		}
	}
});

 摘自

posted @ 2019-07-31 17:34  安筱雨  阅读(1501)  评论(0编辑  收藏  举报