$(window).height() vs $(document).height

前端 未结 5 775
小鲜肉
小鲜肉 2020-12-02 08:56

I am having problem of getting wrong height with

$(window).height();

and got the similar question here

In my case when I try

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-02 09:10

    $(document).height:if your device height was bigger. Your page has Not any scroll;

    $(document).height: assume you have not scroll and return this height;

    $(window).height: return your page height on your device.

提交回复
热议问题