10 09/2014

jquery mobile swip threshold

最后更新: Wed Sep 10 2014 12:39:11 GMT+0800

Triggered when a horizontal drag of 30px or more (and less than 75px vertically) occurs within 1 second duration but these can be configured:

默认是 左右超过 30px 并且上下少于 75px 认定为 swip(滑动)

  • $.event.special.swipe.scrollSupressionThreshold (default: 10px) – More than this horizontal displacement, and we will suppress scrolling.
  • $.event.special.swipe.durationThreshold (default: 1000ms) – More time than this, and it isn’t a swipe.
  • $.event.special.swipe.horizontalDistanceThreshold (default: 30px) – Swipe horizontal displacement must be more than this.
  • $.event.special.swipe.verticalDistanceThreshold (default: 75px) – Swipe vertical displacement must be less than this.