Handle the Related Events

To execute certain commands when the List is scrolled, handle the scroll event. If the event handling function is not going to be changed during the lifetime of the widget, assign it to the onScroll option when you configure the widget.

$(function () {
        // ...
        onScroll: function(e) {
            var scrollOffset = e.scrollOffset.top;
            var scrolledToTop = e.reachedTop;
            var scrolledToBottom = e.reachedBottom;
            // Handler of the "scroll" event

If you are going to change the scroll event handler at runtime, or if you need to attach several handlers to this event, subscribe to it using the on(eventName, eventHandler) method.

var scrollEventHandler1 = function(e) {
    // First handler of the "scroll" event

var scrollEventHandler2 = function(e) {
    // Second handler of the "scroll" event

    .on("scroll", scrollEventHandler1)
    .on("scroll", scrollEventHandler2);
See Also