Last active
August 29, 2015 13:57
-
-
Save yoonsy/9686395 to your computer and use it in GitHub Desktop.
determine time to load more. for infinite scroll.
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
function timeToLoadMore( threshold ){ | |
var wScrollTop = $(window).scrollTop(), | |
wHeight = $(window).height(), | |
dHeight = $(document).height(); | |
return dHeight - (wHeight + wScrollTop) < threshold; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
으.. 이거 로드모어 구현할때마다 계산하기 귀찮아서 만들었다