Pagination

The Pagination Class provides properties, methods, and events to interface with the HTML tags generated by the <silk:Pagination> tag.

Kind: global class

Properties

Name
Type
Description

$pagination

Object

jQuery object referencing the pagination HTML tag.

currentPage

Integer

The index of the selected page

totalRows

Integer

The total rows returned by the query.

totalPages

Integer

The total generated pages.

$pageStartRow

Integer

The page starting the pages list view.

$pageSize

Integer

The number of items per page.

$showPages

Integer

Number of pages to be displayed

$leftArrow

Object

jQuery object referencing the pagination's left arrow.

$rightArrow

Object

jQuery object referencing the pagination's right arrow.

Constructor

new Pagination(id, size, pages, label)

Returns a Pagination instance.

Param
Type
Default
Description

id

String

Unique identifier.

size

Integer

500

The number of target items per page.

pages

Integer

10

The number of pages listed in the pagination bar.

label

String

Records

Optional pagination label.

Methods

clean()

Method to clean the pagination container.

Kind: instance method of Pagination

on

Load events to respond to the pagination's interactions. To set an event, use this code: Pagination.on(<eventName>, function(){<code>}).

Kind: instance property of Pagination

Param
Type
Description

eventName

String

The event's name.

eventFunction

function

The function to be triggered.

Events

on:click

The event is triggered when a page button is clicked. Created with the Pagination.on("click", function(){}) method.

Kind: event emitted by Pagination

Last updated