When using touch actions on a mobile device, the most common use is tapping, holding the screen or gestures, and jQuery Mobile can respond to a user's specific touch by touching the event binding behavior.
One, tap and hold
Directly in the code (everything in the code, it makes the product!) )
<! DOCTYPE html>Tap: Tap EventTaphold: Press and hold events
Second, swipe
Swipe refers to the high-speed swipe left or right on the screen with your finger or stylus, triggering a swipeleft event or Swiperight event.
<! DOCTYPE html>A trick is used in the code above. If you need to change the switching effect during the interface switching process, you must use a hyperlink implementation to set the display property of the link to none. Call the Click () method in the listener function to run the interface switch, and then add data-transition to the link to toggle the effect setting.Three, virtual mouse events
Event |
Meaning |
Vmouseover |
Touch or slide the DOM container above |
Vmoseout |
Touch or slide away |
Vmousedown |
Touch or press the |
Vmoseup |
Touch End or mouse button release |
Vclick |
Touch End or mouse button is released |
|
Vclick events are usually triggered after the Vmouseup event 300ms |
Vmousecancel |
triggered when a Mousecancel event is initiated in a touch event |
...... |
...... |
...... |
...... |
<! DOCTYPE html>
Copyright notice: This article Bo Master original articles, blogs, without consent may not be reproduced.
Xiao Qiang HTML5 Mobile Development Road (--jquerymobile) Touch Interactive