Skip to content

ansrlm/infinitescroll

Repository files navigation

infinitescroll

A class that appends the data when end checker is visible

NPM JavaScript Style Guide

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


About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published