jQuery determines whether there is a scroll bar: first create a front-end code sample file; then use jQuery to control the scroll bar scroll; finally through "if( $("body").scrollTop()>0 ){...}else{ ...}" statement to determine whether the scroll bar is offset.
The operating environment of this tutorial: Windows7 system, jquery1.10.0 version, this method is applicable to all brand computers.
Recommendation: jQuery video tutorial
jQuery to determine whether there is a scroll bar
Use jQuery to control the scroll bar, and then determine whether the scroll bar is offset. If there is, there is a scroll bar, on the contrary, it does not exist without scroll.
1
2
3
4
5
6
7
8
9
10
11
jQuery method to determine whether there is a scroll bar
Guess you like
Origin blog.csdn.net/zy17822307856/article/details/112570932
Recommended
Ranking