prevent touchstart when swiping

前端 未结 11 2053
萌比男神i
萌比男神i 2020-11-30 20:09

I have a scrollable list on a mobile device. They want people to be able to scroll the list via swiping, and also select a row by tapping.

The catch is combining th

11条回答
  •  天命终不由人
    2020-11-30 20:48

    jQuery Mobile has a .tap() event which seems to have the behavior you'd expect:

    The jQuery Mobile tap event triggers after a quick, complete touch event that occurs on a single target object. It is the gesture equivalent of a standard click event that is triggered on the release state of the touch gesture.

    This might not necessarily answer the question, but might be a useful alternative to some.

提交回复
热议问题