Infinite Ajax Scroll

easily transform the traditional pagination to infinite scrolling pages

Plugin Usage

Infinite Ajax Scroll works with a container with element elements that are 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="page2.html" class="next">Next</a>
</div>

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',
  pagination: '.pagination'
});
Posts created 494

Related Posts

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top