Infinite Scrolling¶
To add infinite scrolling to your views simply extend core/views/InfiniteScrollView
, a simple example of this can be found in core/views/specs/infinite
.
InfiniteScrollView¶
-
InfiniteScrollView.
initScroll
([options])¶ Arguments: - options (object) –
The following optional arguments can be passed in the options argument
windowScroll
: defaultfalse
- should be a boolean saying if we want to listen to window.scroll eventsscrollElement
: defaultundefined
- DOM element we want to listen to scroll events forintervalPeriod
: default 250ms - time in ms which we should check if the user has scrolledscrollThreshold
: defaultundefined
a floating point integer between 0 and 1 - The ratio representating how far down a page scroll should thescrollCallbacks
be called. If left undefinedscrollCallbacks
are called whenever the scroll event fires.
- options (object) –
-
InfiniteScrollView.
scrollCallbacks
¶ Array like object of functions to be called when the user scrolls down the page.