hju*_*ter 15 javascript jquery scrolltop
我正在制作一些插件,我需要获得scrollTop文档的最大价值.最大值scrollTop是2001,但$(document).height()返回2668并$('body')[0].scrollHeight给我undefined.
如何2001通过javascript/jquery?!
Tim*_*imm 31
您的评论中的代码应该有效:
$(document).height() - $(window).height()
Run Code Online (Sandbox Code Playgroud)
这是一个示例,当您滚动到最大滚动位置时会发出警报:http://jsfiddle.net/DWn7Z/