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

前端 未结 5 1016
不思量自难忘°
不思量自难忘° 2021-02-13 23:25

(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:39

    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.

提交回复
热议问题