Paginate command
Lets you create paginated content.
Basic Usage (HTML)
data-jkit="[paginate:limit=5;animation=fade]"
Advanced Init (JavaScript)
$('#myelement').jKit('paginate', { 'limit': '5', 'animation': 'fade' });
Options
Option | Values | Default | Description |
---|---|---|---|
limit | Int | 25 | The height in Pixels or the number of entries |
by | “node” or “height” | node | By what measure to split the content, either the height of the content or the number of entries |
container | jQuery Selector | An optional element with that contains the entries | |
pos | “after” or “before” | after | Where to place the pagination |
animation | “fade”, “slide”, “grow” or “none” | none | The type of animation used for the transition |
speed | Int or “fast”, “slow” (Milliseconds) | 250 | The duration of the animation in milliseconds, bigger = slower. |
easing | String (“linear” or easing plugin option) | linear | The easing behavior of the animation |
Events
Event | Description |
---|---|
showpage | Triggered when a new page is being shown |
showpageN | Triggered when a new page is being shown where N is the page index |
Examples
Table example:
Paginate the rows of a table:
Name | Location | Birthday | Category | Status | Superior | Price (CHF) |
---|---|---|---|---|---|---|
Mr. Max Keller | CH-7278 Davos Monstein | 1-29-1986 | freelancer | active | #120 | 1.00 |
Ms. Sophia Roth | CH-3186 Düdingen | 2-16-1955 | freelancer | active | #120 | 25.25 |
Mr. Fredi Baumann | CH-6543 Arvigo | 11-21-1993 | freelancer | active | 2.99 | |
Ms. Hannah Zimmermann | LI-9493 Mauren | 6-26-1967 | freelancer | active | #1168 | 48.95 |
Ms. Maja Brunner | D-21207 Seevetal | 10-22-1934 | trainee | active | #120 | 200.10 |
Mr. Tom Fischer | LI-9492 Eschen | 5-19-1955 | freelancer | inactive | #1168 | -5.05 |
Mr. Kon Fischer | LI-9492 Eschen | 5-19-1955 | freelancer | inactive | #1168 | -5.05 |
Ms. Alina Gerber | D-21710 Engelschoff | 10-15-1981 | employee | active | #1168 | 10 |
Mr. Tim Gerber | CH-6543 Arvigo | 12-8-2022 | freelancer | active | #120 | 4721.45 |
Mr. Felix Meier | LI-9486 Schaanwald | 8-26-1975 | guest | active | #120 | 12.55 |
Mr. Fredi Müller | LI-9486 Schaanwald | 10-24-1953 | trainee | active | #120 | 354.50 |
Mr. Tim Gerber | CH-1773 Léchelles | 12-25-1966 | freelancer | active | 42.85 | |
Ms. Lilli Meyer | D-21207 Seevetal | 11-29-1938 | guest | active | 87.41 | |
Ms. Emilie Fischer | D-04299 Leipzig | 11-7-2022 | freelancer | active | #463 | 354.01 |
Mr. Fredi Graf | CH-6534 S. Vittore | 12-7-2022 | employee | active | #120 | 14.12 |
Ms. Cordelia Weber | CH-6543 Arvigo | 2-23-1967 | employee | active | #120 | 10.25 |
Source:
<table width="100%" data-jkit="[paginate:limit=5;container=tbody]"> <thead> <tr> <th>Name</th> <th>Location</th> <th>Birthday</th> <th>Category</th> <th>Status</th> <th>Superior</th> <th>Price (CHF)</th> </tr> </thead> <tbody> <tr><td>Mr. Max Keller</td><td>CH-7278 Davos Monstein</td><td>1-29-1986</td><td>freelancer</td><td>active</td><td>#120</td><td>1.00</td></tr> <tr><td>Ms. Sophia Roth</td><td>CH-3186 Düdingen</td><td>2-16-1955</td><td>freelancer</td><td>active</td><td>#120</td><td>25.25</td></tr> <tr><td>Mr. Fredi Baumann</td><td>CH-6543 Arvigo</td><td>11-21-1993</td><td>freelancer</td><td>active</td><td></td><td>2.99</td></tr> <tr><td>Ms. Hannah Zimmermann</td><td>LI-9493 Mauren</td><td>6-26-1967</td><td>freelancer</td><td>active</td><td>#1168</td><td>48.95</td></tr> <tr><td>Ms. Maja Brunner</td><td>D-21207 Seevetal</td><td>10-22-1934</td><td>trainee</td><td>active</td><td>#120</td><td>200.10</td></tr> <tr><td>Mr. Tom Fischer</td><td>LI-9492 Eschen</td><td>5-19-1955</td><td>freelancer</td><td>inactive</td><td>#1168</td><td>-5.05</td></tr> <tr><td>Mr. Kon Fischer</td><td>LI-9492 Eschen</td><td>5-19-1955</td><td>freelancer</td><td>inactive</td><td>#1168</td><td>-5.05</td></tr> <tr><td>Ms. Alina Gerber</td><td>D-21710 Engelschoff</td><td>10-15-1981</td><td>employee</td><td>active</td><td>#1168</td><td>10</td></tr> <tr><td>Mr. Tim Gerber</td><td>CH-6543 Arvigo</td><td>12-8-1943</td><td>freelancer</td><td>active</td><td>#120</td><td>4721.45</td></tr> <tr><td>Mr. Felix Meier</td><td>LI-9486 Schaanwald</td><td>8-26-1975</td><td>guest</td><td>active</td><td>#120</td><td>12.55</td></tr> <tr><td>Mr. Fredi Müller</td><td>LI-9486 Schaanwald</td><td>10-24-1953</td><td>trainee</td><td>active</td><td>#120</td><td>354.50</td></tr> <tr><td>Mr. Tim Gerber</td><td>CH-1773 Léchelles</td><td>12-25-1966</td><td>freelancer</td><td>active</td><td></td><td>42.85</td></tr> <tr><td>Ms. Lilli Meyer</td><td>D-21207 Seevetal</td><td>11-29-1938</td><td>guest</td><td>active</td><td></td><td>87.41</td></tr> <tr><td>Ms. Emilie Fischer</td><td>D-04299 Leipzig</td><td>11-7-1942</td><td>freelancer</td><td>active</td><td>#463</td><td>354.01</td></tr> <tr><td>Mr. Fredi Graf</td><td>CH-6534 S. Vittore</td><td>12-7-1971</td><td>employee</td><td>active</td><td>#120</td><td>14.12</td></tr> <tr><td>Ms. Cordelia Weber</td><td>CH-6543 Arvigo</td><td>2-23-1967</td><td>employee</td><td>active</td><td>#120</td><td>10.25</td></tr> </tbody> </table>
List example:
Paginate the entries of a list by the height of the elments and fade in the new content:
- jh sdgjkgh fjdhsgdfjkhgfjkdhsg jhjksdgh fjkdhg jkfdshjkg jkfdh sgjkhfdjkshg fjhgjkfhdjsghjksh g
- hdjh gjkdfhgj khfdjkgha jfhgkj gdsalhd f
- j dsfjk hdjf gdshafg hdsgfa hjhdfg sdhjgfjh dsfahj ghdfg dsahgfhjsdfgh ab
- j dhsfkajhdj fghjkdhg ajfhjghd sjhagjjkhgfjdh gjkhdfjkahgj
- dh safhjkl hgfdjhasjdkghjhdajkhg jdfh gahjkd hsajghj fghadfjk hjgkh jkhg dfa
- d skhafmh gjhdfjka ghjghjk dashjgjkhf adhfg jdhajk sg
- d sfhajhdjfhjsda gjh jl
- d shfjklh djkahfgjk dajksghjkghadsj jkgh jdashjk ghjksadg jgh ljhdjgks ad sjhaflkhf jkadghjh gjklhdgajhkjljksagl asdg
- d dhjsfga hjgdsagads jdsha hfj hj salhfjd shakhfd jkahsd fjkdsagfjkgfdjhsagl fjhgsda l
- jj sakdflh jkh djkhfjdsajhf jdsfhgdshfhjdfh jkhdsjd sfagjklg dfsjajdgjkgdsajkl jdas gljkds akl
- dmh safhgjk dashjf kgjkfgd sajkgfjk sdjhgf lsdagjk gfjkdas gfg asd
- jgajs fgjk
Source:
<ul style="width:250px" data-jkit="[paginate:by=height;limit=100;animation=fade;pos=before]"> <li>jh sdgjkgh fjdhsgdfjkhgfjkdhsg jhjksdgh fjkdhg jkfdshjkg jkfdh sgjkhfdjkshg fjhgjkfhdjsghjksh g</li> <li>hdjh gjkdfhgj khfdjkgha jfhgkj gdsalhd f </li> <li>j dsfjk hdjf gdshafg hdsgfa hjhdfg sdhjgfjh dsfahj ghdfg dsahgfhjsdfgh ab</li> <li>j dhsfkajhdj fghjkdhg ajfhjghd sjhagjjkhgfjdh gjkhdfjkahgj</li> <li>dh safhjkl hgfdjhasjdkghjhdajkhg jdfh gahjkd hsajghj fghadfjk hjgkh jkhg dfa</li> <li>d skhafmh gjhdfjka ghjghjk dashjgjkhf adhfg jdhajk sg</li> <li>d sfhajhdjfhjsda gjh jl</li> <li>d shfjklh djkahfgjk dajksghjkghadsj jkgh jdashjk ghjksadg jgh ljhdjgks ad sjhaflkhf jkadghjh gjklhdgajhkjljksagl asdg</li> <li>d dhjsfga hjgdsagads jdsha hfj hj salhfjd shakhfd jkahsd fjkdsagfjkgfdjhsagl fjhgsda l</li> <li>jj sakdflh jkh djkhfjdsajhf jdsfhgdshfhjdfh jkhdsjd sfagjklg dfsjajdgjkgdsajkl jdas gljkds akl</li> <li>dmh safhgjk dashjf kgjkfgd sajkgfjk sdjhgf lsdagjk gfjkdas gfg asd</li> <li>jgajs fgjk</li> </ul>
Example CSS
ul.jkit-pagination, ul.jkit-pagination li { margin: 0px; padding: 0px; list-style: none; } ul.jkit-pagination { margin-top: 10px; } ul.jkit-pagination li { display: inline; background: #333; color: #fff; padding: 6px; padding-top: 3px; padding-bottom: 2px; cursor: pointer; cursor: hand; margin-right: 5px; } ul.jkit-pagination li.active { background: #f30; }
Replacements
There are currently no replacements for this command.
[ Learn more about replacements ]
Discussions
Do you have questions or do you want to suggest new features? Than head over to our new community:
[ jKit Community ]