Cjax Framework


Project development is new to github. Give us a star.

Pagination

Pagination plugin can easily be implement into pages, hassle free.
Requires Cjax 5.9+.

This functionality has no dependencies, any dependencies are already built-in.

Credit for this plugin goes to Cj Galindo and, also includes the works of Eugene Simakin.

Examples

Basic Usage

This example using the very minimum settings. If you want to customize it the way you really want it, you could use some of the available options.

PHP
<?php 


    $options  
= array(
        
'url' => 'ajax.php?pagination/page',
        
'totalPages' => 15
    
);

    
$ajax->pagination('pager1'$options);

?>
HTML

	<div id='pager1'></div>




' src='resources/images/try_it.png' />

Try it


Pagination Page One

Advanced Usage

Here showcased all the possible options you can use.

PHP
<?php 


    $options  
= array(
        
'url' => 'ajax.php?pagination/page',
        
'totalPages' => 10,
        
'startPage' => 1,
        
'visiblePages' => 7,
        
'initiateStartPageClick' => false,
        
'href' => false,
        
'first' => 'First',
        
'prev' => 'Previous',
        
'next' => 'Next',
        
'last' => 'Last',
        
'loop' => false,
        
'paginationClass' => 'pagination',
        
'nextClass' => 'next',
        
'prevClass' => 'prev',
        
'lastClass' => 'last',
        
'firstClass' => 'first',
        
'pageClass' => 'page',
        
'activeClass' => 'active',
        
'disabledClass' => 'disabled',
        
'pageContainer' => 'page',
        
'cache' => true,
        
'size' => 'large'
    
);

    
$ajax->pagination('pager2'$options);

?>
HTML

	<div id='pager2'>Pagination Page One</div>




' src='resources/images/try_it.png' />

Try it


Pagination Page One


Small Size

For the smaller size pagination

PHP
<?php 


    $options  
= array(
        
'url' => 'ajax.php?pagination/page',
        
'totalPages' => 50,
        
'visiblePages' => 10,
        
'size' => 'small'
    
);

    
$ajax->pagination('pager3'$options);

?>
HTML

	<div id='pager3'>Pagination Page One</div>




' src='resources/images/try_it.png' />

Try it


Pagination Page One

Previous Topic:  Previous Class    ·   Top of Page   ·   Demos Home   ·  

CodeIgniter  ·  Copyright © 2006 - 2012  ·  Cjax