Search code examples
jquerycallbackscrolljscrollpane

Jscrollpane - Fires a function when isAtBottom


I know that the jscrollpane fires a function when "isAtBottom" finally becomes true.

But what is the name of this function respectively how can I check if "isAtBottom" finally becomes true?

http://jscrollpane.kelvinluck.com/events.html


Solution

  • jScrollPane doesn't fire a function for that condition, it fires an event. You can bind to the event the same way you'd bind to any other jQuery event:

    $('.your-scroll-pane').bind(
        'jsp-arrow-change',
        function(event, isAtTop, isAtBottom, isAtLeft, isAtRight) {
            // Now look at the is* parameters and do what you
            // need to do. All four of the is* parameters are
            // booleans.
        }
    );