...
|
...
|
@@ -86,16 +86,16 @@ disableScroll(); |
|
|
// 移动端touch重写
|
|
|
var startX, startY;
|
|
|
$sideNav.on('touchstart', function(e){
|
|
|
startX = e.changedTouches[0].pageX;
|
|
|
startY = e.changedTouches[0].pageY;
|
|
|
startX = e.originalEvent.touches[0].pageX;
|
|
|
startY = e.originalEvent.touches[0].pageY;
|
|
|
});
|
|
|
|
|
|
// 仿innerScroll方法
|
|
|
$sideNav.on('touchmove', function(e){
|
|
|
e.stopPropagation();
|
|
|
|
|
|
var deltaX = e.changedTouches[0].pageX - startX;
|
|
|
var deltaY = e.changedTouches[0].pageY - startY;
|
|
|
var deltaX = e.originalEvent.touches[0].pageX - startX;
|
|
|
var deltaY = e.originalEvent.touches[0].pageY - startY;
|
|
|
|
|
|
// 只能纵向滚
|
|
|
if(Math.abs(deltaY) < Math.abs(deltaX)){
|
...
|
...
|
|