Detecting bottom of div scroll (w/jScrollPane)
I have a scrollable div that will load 5 new items when scrolled to the bottom. I'm using jScrollPane (http://jscrollpane.kelvinluck.com/) and, despite being a great plug in, seems to prevent scrollTop() from working, so the typical method for detecting the scroll reaching the bottom does not work.
Does anyone have an alternative/ recommended method for detecting if the jscrollpane-if开发者_运维知识库ied div has reached the bottom?
Cheers.
Solved myself, with maxedison's help.
Access the api as outlined here and then:
if($('#scollpane').outerHeight() + api.getContentPositionY() >= api.getContentHeight())
{
alert('You are at the bottom bro');
}
精彩评论