How to get maximum document scrolltop value

前端 未结 4 834
执笔经年
执笔经年 2020-12-15 20:12

I am making some plugin and I need to get maximum scrollTop value of the document. Maximum scrollTop value is 2001 , but $(docum

4条回答
  •  无人及你
    2020-12-15 20:42

    The code in your comments should work:

    $(document).height() - $(window).height()
    

    Here's an example that alerts when you scroll to the maximum scroll position: http://jsfiddle.net/DWn7Z/

提交回复
热议问题