如何使用jquery分页HTML列表 [英] How to paging an HTML list using jquery
问题描述
你好
我在html中有一个列表,我想用jquery来分页。有人可以帮帮我吗?
我尝试过的事情:
在我的HTML中:
< ul >
< li > ... < / li >
< li > ... < / li >
。
。
。
< li > ... < / li >
< / ul > <! - 我的清单结束 - >
< ul id = 分页 > < ; / ul >
和JS:
$( function (){
$( #Pagination)。分页({
项目: 100 ,
itemsOnPage: 2 ,
cssStyle:' light-theme'
});
});
这是我得到帮助的网站:
< a href =http://flaviusmatis.github.io/simplePagination.js/> Paginatio
但是分页按钮不会打开列表并且不会影响它。我该怎么办?
( function (){
< blockquote>( #Pagination)。分页({
items: 100 ,
itemsOnPage: 2 ,
cssStyle: ' light-theme'
});
});
以下是我得到帮助的网站:
Paginatio
但是分页按钮不会对列表进行分页,也不会影响它。我应该做什么?
有一个带有源代码的示例演示,应该足以让您入门,请参阅以下网址的演示:
simplePagination [ ^ ]
及其源代码可用在github上的以下网址:
bin / simplepagination at master·bilalakil / bin·GitHub [ ^ ]
希望它可以帮到你。 :)
更新:
您还可以查看以下帖子:
javascript - 如何使用SimplePagination jquery - Stack Overflow [ ^ ]
Hello
I have a list in html that I want to page it using jquery. can anyone help me please?
What I have tried:
in my html:
<ul>
<li>...</li>
<li>...</li>
.
.
.
<li>...</li>
</ul> <!-- End of my List -->
<ul id="Pagination"></ul>
and JS:
$(function() {
$("#Pagination").pagination({
items: 100,
itemsOnPage: 2,
cssStyle: 'light-theme'
});
});
Here is the site that I am have get helped:
Paginatio
but the paging buttons will not page the List and will not affect it. what shoul I do?
(function() {
("#Pagination").pagination({ items: 100, itemsOnPage: 2, cssStyle: 'light-theme' }); });
Here is the site that I am have get helped:
Paginatio
but the paging buttons will not page the List and will not affect it. what shoul I do?
There is sample demo with source code avaiable, which should be enough to get you started, see the demo at following url:
simplePagination[^]
and the source code for it is avaiable on github at following url:
bin/simplepagination at master · bilalakil/bin · GitHub[^]
Hope it help you out. :)
UPDATE:
you can also have a look at following post :
javascript - How to use SimplePagination jquery - Stack Overflow[^]
这篇关于如何使用jquery分页HTML列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!