Created
April 29, 2014 00:03
-
-
Save silianlinyi/11387525 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 判断滚动条是否已经到页面底部 | |
$(window).scroll(function() { | |
var scrollTop = $(this).scrollTop(); | |
var scrollHeight = $(document).height(); | |
var windowHeight = $(this).height(); | |
if (scrollTop + windowHeight == scrollHeight) { | |
console.log('滚动条已经到达页面底部'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment