正确答案:在start中设置 allmovewidth = 0;在Move事件中 allmovewidth += Math.abs(nextplace - moveplace);moveplace 为 touch.pageXnextplace 为 上一次的moveplace,初始为0allmovewidth 表示了滑动的距离
正确答案:
在start中设置 allmovewidth = 0;
在Move事件中 allmovewidth += Math.abs(nextplace - moveplace);
moveplace 为 touch.pageX
nextplace 为 上一次的moveplace,初始为0
allmovewidth 表示了滑动的距离