This article mainly introduces the paging Effect of PHP + jQuery + Ajax, And the jPaginate plug-in application jPaginate is a jQuery-based Dynamic rolling paging plug-in, which is represented in the same way as pagination buttons, it is very interesting that these buttons can be rolled. You can control the front and back scrolling of the button by clicking or sliding the mouse to the small arrows on both sides of the point.
The method to call the jPaginate plug-in is simple:
$(elementID).paginate()
Attribute settings
Fortunately, jPaginate provides many attribute configurations, allowing you to easily customize the desired paging effect.
The setting method is as follows:
$(elementID).paginate({ count:80, start:1, ... })
Count:Number, total number of records.
Start:Number, the number of pages that start to be displayed. For example, 3 indicates that the page starts from 3rd.
Display:Number, the number of pages displayed by page, for example, 5 indicates the number of 5 pages displayed at a time.
Border:Whether to display the border of the page number. (True/false)
Border_color:Set the border color, for example, "# d3d3d3 ".
Text_color:Set the page color, for example, "#68ba64 ".
Background_color:Set the background color of the page number, for example, "# f7f7f7 ".
Border_hover_color:Set the color of the page number border when the mouse slides to the page number.
Text_hover_color:Set the page color when the mouse slides to the page number.
Background_hover_color:Set the background color of the page number when the mouse slides to the page number.
Images:Whether to display the page number navigation arrow (Direction arrow) (true/false)
Mouse:When it is set to 'Press ', when the mouse slides toward the navigation arrow, the page number will scroll; when it is set to 'slid', the mouse clicks the navigation arrow to scroll the page number once.
OnChange:When the page number is clicked, the callback function.
Example application: PHP + jQuery achieves Ajax paging Effect
First, prepare index. php. This page is used to display a list of blog articles by page.
1. Reference JS: