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

前端 未结 5 1009
不思量自难忘°
不思量自难忘° 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:49

    The height of the document is not necessarily the same as the height of the window. If you have a simple document with just a DIV and a little bit of text, the doc height will be miniscule compared to the height of the window.

提交回复
热议问题