What?
Flexipage is a jQuery plugin for paginate any HTML content. Inspired in Quick Paginate plugin.
- Paginate HTML elements you want
- Customized navigation controls
- Tested in: IE 6.0+, FF 2+, Safari 2.0+
- It's your code!
Usage
To use the flexipage plugin, include jQuery and jquery.flexipage inside the <head> tag of your document:
<script src="javascripts/jquery-1.3.2.min.js" type="text/javascript"></script> <script src="javascripts/jquery.flexipage.js" type="text/javascript"></script>
Then write some HTML like this:
<div>
<ul class="fp-example">
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
...
<li>Item 22</li>
<li>Item 23</li>
<li>Item 24</li>
<li>Item 25</li>
</ul>
</div>
And start flexipage
$('.fp-example').flexipage();
You can also pass in configuration options when you initialize the pagination, for example:
$('.fp-example').flexipage({
element:'a',
perpage:1,
carousel: true,
navigation: true,
pager: false
});
Configuration
| Property | Type | Default | Description |
|---|---|---|---|
| element | string | 'li' | Indicates the element you want to paginate |
| pager | boolean | true | This turns OFF pagination controls |
| next_txt | string | 'Next' | (if pager is set to true) Next text |
| prev_txt | string | 'Prev' | (if pager is set to true) Prev text |
| pager_selector | string | false | Custom CSS selector for pager controls wrapper (must be inside pagination wrapper) |
| perpage | number | 5 | Indicates the number of items to show per page |
| showcounter | boolean | true | This turns off pager counter which shows actual page and total pages |
| hidden_css | object | {display:'none'} | Indicates CSS conditions for elements in active page |
| visible_css | object | {display:'block'} | Indicates CSS conditions for elements in inactive pages |
| firstpage | number | 1 | The first page displayed when flexipage starts |
| navigation | boolean | false | Turns ON extended pager controls (one link per page) |
| carousel | boolean | false | Turns ON carousel |
| speed | number | 300 | (if carousel is set to true) Time lag between go from one page to next or prev |
| animation | string | 'linear' | (if carousel is set to true) The name of the easing effect that you want to use, "linear" or "swing". For more: http://plugins.jquery.com/project/Easing |
selectPage method
You can control any pager from outside whit this method:
$('.fp-example').selectPage('next');
$('.fp-example').selectPage('prev')
$('.fp-example').selectPage(9)




