JQuery Detect Scroll at Bottom

后端 未结 10 851
南方客
南方客 2021-01-30 09:58

I wish to achieve content load when the user scrolls to the bottom of the page.

I am having a problem. It works fine on desktop browsers but not on mobile. I have imple

10条回答
  •  悲&欢浪女
    2021-01-30 10:02

    This is what worked for me:

    (window.innerHeight + window.scrollY) == $(document).height()
    

    Found here: Javascript: How to detect if browser window is scrolled to bottom?

提交回复
热议问题