What is the difference between $(document).height() and $(window).height()

前端 未结 5 1543
我寻月下人不归
我寻月下人不归 2021-02-13 23:05

(Hope it is not a duplicate because I didn\'t find it when searching and googling)

I am trying to find how to detect in some fixed-height div (\'#div\') when the scroll-

5条回答
  •  自闭症患者
    2021-02-13 23:50

    The document height is the entire height of the whole document, even what is outside the viewable area. This could be thousands of pixels if you have a long page. The window height is just the viewable area.

提交回复
热议问题