Paginator is a very simple jQuery addon that implements containers with multiple "pages" (hence the name) of which one is always active/shown, the others ususally hidden.
Paginator aims to be simple to use, rich in animations (page transitions) while keeping variants on those easy to implement, and basically an all-round tool for carousels or image galleries.
Paginator is WIP, please report any bugs on Github.
Grab a copy from github or simply download/link the CSS and JavaScript files from here:
paginator.css paginator.jquery.jsThe transision between pages can be soley defined using CSS classes. There are a few basic classes that are applied to the page elements depending on their current state:
left
page is left of current pagecurrent
page is the current pageright
page is right of the current pageoffset-1
page is direct neighbor of current pageoffset-2
page is 2 pages away from the current pageoffset-...
etc.This is very simple to implement, but does not work with touch-and-drag for obvious reasons.
Using a single function, a transformation can be implemented that defines CSS properties for each page depending on its current offset.