About jquery unblock default events

Source: Internet
Author: User

Recently help a friend to do something, the whole screen has a mask layer, but this mask layer can slide, so Baidu a bit, return to the present, with

$ (' body '). Bind ("Touchmove", function (e) {
E.preventdefault ();

});

This sentence, you can stop the mask layer sliding, so that the screen fixed, but when the mask layer disappears, this screen still cannot slide, this is squid above that function is still executing, at that time, has been in Baidu a method, is how to unblock the default behavior, how also did not Baidu out, later drank saliva, brainwave, found that as long as the event just bound to release the good, so that the E.preventdefault () will not work, and then solve their own problems, this feeling is very good!

About jquery unblock default events

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.