In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly shows you how to use the paging plug-in smartpaginator in jquery. The content is simple and easy to understand. The organization is clear. I hope it can help you solve your doubts. Let Xiaobian lead you to study and learn how to use the paging plug-in smartpaginator in jquery.
A pagination toolbar plug-in: Smart Paginator, this plug-in is still very wide use, and customizable quite good, currently built-in three colors, if necessary, you can change css custom color
1. How to use Smart Paginator? 1.1 Introduce the following documents 1.2 Add a pagination container layer 1.3 initialization plugin $(document).ready(function() { $('#smart-paginator').smartpaginator({ totalrecords: total, recordsperpage: items_per_page, next: 'Next page', prev: 'Previous page', first: 'home page', last: 'last page', Go: 'Go to,' theme: 'docloud-pagi', initval: current_page, onchange: onPageChange }); }); function onPageChange(newPageValue) { current_page = newPageValue; //Make some changes according to the new page number, such as page update operation getImageList(newPageValue); }
You can see that to initialize Smart Paginator, you need to configure many parameters. Let's take a look at the meaning of these main parameters.
2. parameter description
parameters
default value
type
described
totalrecords
0
Number
Total Pages
recordsperpage
0
Number
data volume per page
length
10
Number
This parameter is very special. The display control of previous page, next page, first page and last page depends on this parameter. When the value of length is greater than totalrecords/recordsperpage, the previous page, next page, first page and last page are not displayed.
next
Next
String
Next Page Text
prev
Prev
String
Previous Text
first
First
String
First Page Text
last
Last
String
Last page of text
go
Go
String
Skip Text
theme
green
Stirng
template
display
double
String
initval
1
Number
Default page number
datacontainer
"
String
Data container id, see demo3
dataelement
"
String
Data element refers to the selector of the corresponding child element under the container. Please see demo2.
onchange
null
Function
Functions triggered after paging changes
3. Custom color templates.docloud-pagi { background-color: #F0F5FF; } .docloud-pagi.normal { background-color: #588500; color: White; border: solid 1px #5f9000; } .docloud-pagi.active { background-color: #344C00; color: #F8EB00; border: solid 1px #5f9000; } .docloud-pagi .btn { background-color: #588500; color: White; border: solid 1px #5f9000; } The above is "How to use smartpaginator in jquery" All the contents of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 213
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.