0 ){...}else{ ...}" statement can be used to determine whether the scroll bar is offset.">
How jQuery determines whether a scroll bar exists: First create a front-end code sample file; then use jQuery to control the scroll bar scrolling; finally pass "if( $("body").scrollTop()>0) {...}else{...}" statement can be used to determine whether the scroll bar is offset.
#The operating environment of this tutorial: Windows 7 system, jquery1.10.0 version, thinkpad t480 computer.
Recommended:jquery video tutorial
jQuery determines whether there is a scroll bar
Use jQuery to control the scroll bar scrolling, and then determine Whether the scroll bar is offset. If there is, the scroll bar exists, otherwise it does not exist without scrolling.
The above is the detailed content of jQuery method to determine whether scroll bar exists. For more information, please follow other related articles on the PHP Chinese website!