var ruletxt = $ (". Wanfan. Rule. Rule-txt");
var Ruletxtbottom = $ (". Wanfan. Rule. Rule-txt. Rule-txt-bottom");
var flag = ';
$ (". Wanfan. Rule. rule-btn"). On (' click ', function () {
var h=window.screen.height;
Ruletxt.css ({' width ': ' 100% ', ' left ': ' 0px '});
Ruletxtbottom.css ({' Height ': h/2});
$ (". Rule. Rule-txt"). Animate ({' bottom ': ' 0px '});
flag = 1;
});
Document.addeventlistener (' Touchmove ', function (event) {//Listen for scrolling events
if (flag==1) {//judgment is performed when masking is displayed, no scrolling
Event.preventdefault (); The most critical sentence, prohibit browser default behavior
}
});
$ (". Wanfan. Rule. Rule-txt-top span"). Click (function () {
$ (". Rule. Rule-txt"). Animate ({' Bottom ': '-100% '});
Flag = 0;
});
found that even the mask layer can not slide, can only use the selector;
Http://www.cnblogs.com/licf/p/4691556.html
Mobile end Disable masking layer below screen swipe