.. _infiniteScroll: ===================== Ajax based pagination ===================== Using ajax for the pagination can be achieved by using little bit of JavaScript .. hint:: There are various discussions if endless scrolling and ajax based pagination is actually a good idea as there are also some disadvantages as well. This tutorial uses the implementation of https://infinite-scroll.com/. **Be aware** that this code might require to buy a `license `__! Templating ^^^^^^^^^^ The following template can be used as a replacement of `Templates/News/List.html` .. code-block:: html
Configuration ^^^^^^^^^^^^^ All options are described at https://infinite-scroll.com/. After the inclusion of the library the configuration can either take place in HTML directly .. code-block:: html
or by using JavaScript .. code-block:: javascript let elem = document.querySelector('.articles'); let infScroll = new InfiniteScroll( elem, { // options path: '.f3-widget-paginator .next a', append: '.article', hideNav: '.f3-widget-paginator' });