How to disable scrolling on mobile phone with jquery

藏色散人
Release: 2021-11-18 10:49:56
Original
1818 people have browsed it

How to implement jquery to prohibit mobile phone scrolling: 1. Create a new HTML document; 2. Create a JS script and use the ".scroll()" method to monitor the scrolling of the page; 3. When the page scrolls, the function is executed: Can.

How to disable scrolling on mobile phone with jquery

The operating environment of this article: windows7 system, jquery version 3.0.0, DELL G3 computer

jquery How to disable scrolling on the phone?

jquery prohibits mobile phone scrolling:

1. The method used by jquery to monitor page scrolling: .scroll().

How to disable scrolling on mobile phone with jquery

2. Create a new HTML document and define the height of

.

How to disable scrolling on mobile phone with jquery

#3. Create a JS script and use the .scroll() method to monitor page scrolling.

How to disable scrolling on mobile phone with jquery

#4. If the page scrolls, execute the function and pop up a hello.

How to disable scrolling on mobile phone with jquery

#5. Save the file and check the effect of .scroll() to monitor page scrolling.

How to disable scrolling on mobile phone with jquery

Recommended learning: "jquery video tutorial"

The above is the detailed content of How to disable scrolling on mobile phone with jquery. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!