Home >Web Front-end >JS Tutorial >jQuery determines when the div scrolls to a certain position with the scroll bar and stops_jquery

jQuery determines when the div scrolls to a certain position with the scroll bar and stops_jquery

WBOY
WBOYOriginal
2016-05-16 16:53:431573browse

Implementation code:

Copy code The code is as follows:




Method description:
The total height of the page minus the scrolled height minus the height of the layer with the ID widget is equal to the height from the bottom of the layer to the bottom;
When the height from the bottom is less than or equal to When specifying the height of a specific position from the bottom, remove the fixed style, and then add absolute positioning to the layer! Add position:relative;

to the parent layer in CSS

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