Paged
A module for handling paged/tabbed content.
npm install paged
Usage
var paged = new Paged(container, sections)
container
is a jQuery element that contains your sectionssections
is a jQuery set of elements that are the pages/tabs you want to show one at a time
paged.goTo(i)
Show the i
th section
paged.reset()
Resets the height of the parent element (useful when the elements change size at different breakpoints)
Example
First, create some HTML like this:
Page 1 This is page one! Page 2 This is page two! Page 3 This is page three!
var Paged = tabbedWidget = // Init to hide the sections and go to the first tab/pagetabbedWidget // Paged objects inherit from node's EventEmitter classtabbedWidget // Show the third tabtabbedWidet