Hammer.js the drag-and-drop effect on the mobile side

Source: Internet
Author: User

Hammer.js can achieve a variety of touch effects on the mobile side. More details can be found on http://www.cnblogs.com/iamlilinfeng/p/4239957.html

However, the discovery of hammer.js implementation function, can only be native Js,jquery code in the hammer effect.

First, the introduction of Hammer.js

Download http://hammerjs.github.io/

<script type= "Text/javascript" src= "Js/hammer.min.js" ></script>

Second, create (touch screen click Effect)

Click on the game boot X to close the boot
New Hammer (document.getElementById ("Game_guide_close")). On ("Tap", function () {
var pop = document.getElementById ("Pop");
document.getElementById ("Game_bg"). RemoveChild (POP);
});

Hammer.js the drag-and-drop effect on the mobile side

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.