Detecting when user scrolls to bottom of div with jQuery

前端 未结 15 1714
一个人的身影
一个人的身影 2020-11-22 14:47

I have a div box (called flux) with a variable amount of content inside. This divbox has overflow set to auto.

Now, what I am trying to do, is, when the use scroll t

15条回答
  •  悲哀的现实
    2020-11-22 15:22

    Guys this is the solution to the zoom issue, it works with all zoom levels, in case you need it:

    if ( Math.abs(elem.offset().top) + elem.height() + elem.offset().top >= elem.outerHeight() ) {
                        console.log("bottom");
                        // We're at the bottom!
                    }
                });
            }
    

提交回复
热议问题