jquery plugin pagination Implement paging effects

Source: Internet
Author: User

Practical jquery Paging Effect plug-in jquery.pagination.js, based on the jquery implementation, according to the Pageselectcallback function callback call through AJAX call Dynamic Data, the current method is to generate JSON data to the JS file, the call of the data is JSO n Format data, the disadvantage is that the data is read out at once, the efficiency will be poor, plug-ins to support a number of parameters of the custom configuration function, or very good, we can according to their own ideas to improve.

How to use:

1. Loading plug-ins and jquery

1 2 3 <link rel= "stylesheet" href= "Pagination.css" > <script type= "text/javascript" src= "Jquery.min.js" ></ script> <script type= "Text/javascript" src= "Jquery.pagination.js" ></script>

2.HTML Content

The

code is as follows:


&lt;div class= "pagination" &gt;&lt;/div&gt;

3. Function call

1 2 3 4 5 6 7 8 9 10 11 12 13-14 <script type= "Text/javascript" > Function Pageselectcallback (page_index, JQ) {alert (page_index); return false;} $ (document). Ready (function () {$ (". Pagination"). Pagination (+, {callback:pageselectcallback, num_edge_entries:1,} ); }); </script>

Parameter configuration explanation

Parameter Name argument description Optional value default

The callback function function () {return false;} callback click the paging button
The number of page numbers selected when Current_page initialization 0
Items_per_page The number of record bars per page that appears
link_to page link string #
Num_display_entries most Number of page numbers one by one
Next_text ' next page ' displays the text string next
Next_show_always if set to False ' next ' button displays the Boolean value true
only if you can also increase the page number Prev_show _always if set to False ' previous ' button The Boolean value is displayed only if you can also navigate to the previous page
Prev_text the text string displayed on ' prev ' Previous
Num_edge_entries If set to 1, It will always show the first and last 1 or 0 0
Ellipse_text the identity string string from the current page number to the first or last time ...
Load_first_page If set to True, the callback function will perform a Boolean value True when the plug-in initializes

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.