jQuery 分页插件


作者:小K 网站:http://www.lnend.com

Demo1


Demo2


如何使用本插件


1.添加分页导航css样式
/* kkPages */
.Pagination{float: right;height: 55px;_height: 45px; line-height: 20px;margin-right: 15px;_margin-right: 5px; color:
#565656;margin-top: 10px;_margin-top: 20px; clear:both;}
.Pagination span{margin-right: 5px;display: block;float: left;margin-left: 5px;}
.Pagination span b{padding: 0 2px;}
.Pagination div {float:left}
.Pagination a{ font-size: 12px;text-decoration: none;display: block;float: left;color: #565656;border: 1px solid #cacaca;height: 20px;line-height: 20px;padding: 0 10px;margin: 0 2px;}
.Pagination .Ellipsis {line-height: 32px;overflow: hidden; display:none;}
cite.FormNum{display: block;float: left;line-height: 20px;height: 20px; font-style: normal; padding-left:10px;}
#PageNum{ color:#777;width: 30px;height: 20px;line-height: 20px; border: 1px solid #cacaca; margin:0 5px; text-align:center;}
.Pagination a:hover,.Pagination a.PageCur{background-color: #ee6600;border: 1px solid #d64c01;color: #ffffff; }

1.引入本插件
<script src="Script/jquery.kkPages.js"></script>

3.调用方法
$('.newslist').kkPages({
   PagesClass:'li', //需要分页的元素
   PagesMth:5, //每页显示个数
   PagesNavMth:5 //显示导航个数
});