Xiao Qiang HTML5 Mobile Development Road (--jquerymobile) Touch Interactive

Source: Internet
Author: User

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 Event

Taphold: 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.