The List.js paging plugin is bundled with the script and is located in /plugins/paging/list.paging.js and click here if you want to see it in action. To use the plugin just include the .js file at your page and do like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | |
And the paging that gets created looks kinda like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | |
There are som options available thought.
name (String, default: “paging”)
Default option for all plugins. Defines how to access the plugin from the list objectlistObj.pluginName.pagingClass (String, default: “paging”)
The class that defines whichulthat should contain the paging (must be inside the list container)innerWindow (Int, default: 2)
How many pages should be visible on each side of the current page.
innerWindow: 2… 3 4 5 6 7 …
innerWindow: 1… 4 5 6 …outerWindow (Int, default: 0)
How many pages should be visible on from the beginning and from the end of the paging.
outerWindow: 0… 3 4 5 6 7…
outerWindow: 21 2 … 4 5 6 7 8 … 11 12left (Int, default: 0)
Same asouterWindowbut only from left.outerWindow: 2andleft: 11 … 4 5 6 7 8 … 11 12right (Int, default: 0)
Same asleftbut from right.
Notice: The number of items at each page are decided by the List.js own property page. To set this just add page: Number to the option object sent into the List.js constructor (as been done in both of the examples at this page).
Two pagings
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | |
