README.md

xPagination

A javascript pagination library.

This plugin makes it easier to implement pagination using three (3) DOM
elements as page containers (e.g. divs). "onPagechange" event can be used
to update the contents of the outdated container making sure that we
always have content available for the immediate pages while keeping the
memory usage to a minimum.

How to use

The idea behind this library is to keep the memory usage to a minimum at
the cost of CPU power. So, we use three container divs to navigate through
the pages while updating their content dynamically.

First implement your pagination containers and style them accordingly so
you have one active div shown and two hidden, one on the left (or top)
and one on the right (or bottom). Then initialise a xPagination object and
use the next() / previous() methods to navigate through pages.

Maybe a more useful example is to use the xPagination.JSON.mustache class
which will load the outdated pages with JSON data and use Mustache template
parser to convert each JSON data record into a DOM record.