@ansrlm/infinitescroll
v1.0.7
Published
A class that appends the data when end checker is visible
Downloads
15
Readme
infinitescroll
A class that appends the data when end checker is visible
Install
npm install --save @ansrlm/infinitescroll
Usage
const infiniteScroll = new InfiniteScroll({
scrollContainer: document.querySelector('.scroll'),
listContainer: document.querySelector('.list'),
endChecker: {
container: document,
targetClass: 'loading_bar',
},
fetchData,
callbackFetchData,
options: { type: 'append', expandSize: 15 },
});
infiniteScroll.mount();
Demo
Here is the demo of infinitescroll
<a href="ansrlm.github.io/infinitescroll" />
Upcoming
Soon be added failback function on infinitescroll v1.1.0
Then infinitescroll will support react framework
Dependency
The module infinitescroll needs the following libraries.
@egjs/visible : 2.2.0+
License
MIT © ansrlm