var startScroll, touchStart, touchCurrent;
mySwiper.slides.on('touchstart', function (e) {
startScroll = this.scrollTop;
touchStart = e.targetTouches.pageY;
}, true);
mySwiper.slides.on('touchmove', function (e) {
touchCurrent = e.targetTouches.pageY;
var touchesDiff = touchCurrent - touchStart;
var slide = this;
var onlyScrolling =
(slide.scrollHeight > slide.offsetHeight) &&
(
(touchesDiff < 0 && startScroll === 0) ||
(touchesDiff > 0 && startScroll === (slide.scrollHeight - slide.offsetHeight)) ||
(startScroll > 0 && startScroll < (slide.scrollHeight - slide.offsetHeight))
);
if (onlyScrolling) {
e.stopPropagation();
}
}, true); 解决了吗楼主
页:
1
[2]