Turn your existing pagination into infinite scrolling pages with ease.
More features, documentation and examples available at: https://docs.infiniteajaxscroll.com/
Get up and running in no time by linking directly to Infinite Ajax Scroll on unpkg.
<script src="https://unpkg.com/@webcreate/infinite-ajax-scroll@^3/dist/infinite-ajax-scroll.min.js"></script>
Place this code right before the </body>
tag on each template or page that you want to use infinite scroll on.
Are you using NPM in your projects? You can install and update our package easily.
$ npm install --save @webcreate/infinite-ajax-scroll
Infinite Ajax Scroll works on a container with item elements which get appended. A next link is used to determine the next url.
<div class="container">
<div class="item">...</div>
<div class="item">...</div>
<div class="item">...</div>
...
</div>
<div class="pagination">
<a href="https://github.com/webcreate/infinite-ajax-scroll/blob/master/page1.html" class="prev">Prev</a>
<span class="current">2</span>
<a href="https://github.com/webcreate/infinite-ajax-scroll/blob/master/page3.html" class="next">Next</a>
</div>
Now you can configure Infinite Ajax Scroll:
// import if you use the NPM package
import InfiniteAjaxScroll from '@webcreate/infinite-ajax-scroll';
let ias = new InfiniteAjaxScroll('.container', {
item: '.item',
next: '.next',
prev: '.prev',
pagination: '.pagination'
});
Full documentation can be found at https://docs.infiniteajaxscroll.com
Infinite Ajax Scroll is dual licensed:
Buying a commercial license is mandatory as soon as you develop commercial activities distributing the Infinite Ajax Scroll software inside your product or deploying it on a network without disclosing the source code of your own applications under the AGPL license.
See https://infiniteajaxscroll.com/licenses/ for more details.