代码拉取完成,页面将自动刷新
移动端左右滑动很流畅,但是手指放到滑动块的ul位置上下滚动不起作用,本来想自己改代码,但是你的代码精简过了,我找了几个反编译没成功.....
myScroll = new iScroll('scrollpanel', {
// other options go here...
hScroll: true,
onBeforeScrollStart: function ( e ) {
if ( this.absDistX > (this.absDistY + 5 ) ) {
// user is scrolling the x axis, so prevent the browsers' native scrolling
e.preventDefault();
}
},
//解决第一次无法滑动的问题
onTouchEnd: function () {
var self = this;
if (self.touchEndTimeId) {
clearTimeout(self.touchEndTimeId);
}
self.touchEndTimeId = setTimeout(function () {
self.absDistX = 0;
self.absDistY = 0;
}, 600);
}
});
我在网上找到的解决方案,可能改成这样就好了......https://www.cnblogs.com/CooLLYP/p/6500931.html 这是链接