Home  >  Article  >  Web Front-end  >  Disable scrolling effect after popping up the mask layer [implementation code]_javascript skills

Disable scrolling effect after popping up the mask layer [implementation code]_javascript skills

PHP中文网
PHP中文网Original
2016-05-16 15:03:041572browse

Disable scrolling effect after popping up the mask layer [implementation code]_javascript skills

Method 1:

$('.shade').bind( "touchmove", function (e) {
   e.preventDefault();
});

Method 2:

$("body,.main").height($(window).height()).css({
  "overflow-y": "hidden"
});

The above is the content of disabling scrolling effect after popping up the mask layer [implementation code]_javascript skills, more related content Please pay attention to the PHP Chinese website (www.php.cn)!


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn