Paginator Paginator is a generic widget to display content in paged format.
$('#pag').puipaginator({
    totalRecords: 50,
    rows: "5"
});
                                
<div id="pag"></div>
                                
Name Type Default Description
page Integer 0 Index of the active page.
rows Integer false Defines number of data on a page.
totalRecords Integer 0 Total number of records.
pageLinks Integer false Defines number of page links.
template String {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} Customizable paginator template using paginator element keys.
Name Parameters Description
paginate event: puipaginatorpaginate event,
state: {
    first: First record,
    rows: Number of rows,
    page: Current page,
    pageCount: Total number of pages,
    pageLinks: Number of page links
}
Fired when page changes.
            $('#default').puipaginator({
                paginate: function(event, state) {
                    //...
                }
            });
                                
Name Parameters Description
option name: Name of the option Returns the value of the option.
option name: Name of the option, value: Value of the option Set the value of the option.

Example

$('#default').puipaginator('page', 2);
                                
$(function() {
    $('#pag').puipaginator({
        totalRecords: 50,
        rows: "5"
    });
}); 
                                
<div id="pag"></div>