Simple jquery pagination application, jquerypagination
Today, due to a habit problem, it is a waste of time to record it.
Paging is often used during Web development. In my php code, the page number starts from 1 and has been written as follows:
$ Page = @ intval ($ _ GET ['page']); if ($ page <1) {$ page = 1 ;}
Then limit ( Page − 1) Success Page_size, $ page_size. Currently, the page number is a little redundant from 1.
Jquery. pagination. js is mainly usedRefreshing paginationIn fact, the application is very simple, but because of the above habits, resulting in a long time.
You can download jquery. pagination. js from here. The following are the most basic applications:
$ (". Pagination "). pagination (rows_count, {callback: load_item, prev_text: "Previous Page", next_text: "Next page", items_per_page: 10, current_page: 0 // note the value 0, pagination starts from 0 });
There are several main parameters:
Rows_count: the total number of records to be displayed.
Load_func, callback function name, used to display content
Items_per_page: 10, 10 entries per page
Current_page: 0. The page to be displayed. The page starts from 0 when it is initialized.