jQuery分页插件pagination.js 笔记

原文:http://www.jq22.com/jquery-info5697

简单使用方法

引用

<script src="jquery.js"></script>
<script src="jquery.pagination.js"></script>

html  

<div class="box"></div>

js

$('.box').pagination();
$('.box').pagination({
                coping: false,
                isHide: false,
                current: pageIndex,
                activeCls: 'active',
                totalData: totalCount,
                //pageCount:pageCount,
                showData: pageSize,
                pageCount: 0,
                homePage: '',
                endPage: '',
                prevContent: '<',
                nextContent: '>',
                callback: function (api) {
                    //a=api.getCurrent();
                    GetList(api.getCurrent(), pageSize)
                },
                keepShowPN: true,
                count: 3,
                activeCls: 'cur'
            });

配置信息

pageCount:总页数(默认值:9)
totalData:数据总条数(默认值:0)
showData:每页展示条数(默认值:0)
current:当前第几页(默认值:1)
prevCls:上一页class样式(默认值:'prev')
nextCls:下一页class样式(默认值:'next')
prevContent:上一页节点内容(默认值:'<')
nextContent:下一页节点内容(默认值:'>')
activeCls:当前选中样式(默认值:'active')
count:当前页前后页数(默认值:3)
coping:是否开启首页尾页(默认值:false)
homePage:首页节点内容(默认值:1)
endPage:尾页节点内容(默认值:当前最大页数)
callback():回调函数

demo:https://files.cnblogs.com/files/caolingyi/pagination.zip

原文地址:https://www.cnblogs.com/caolingyi/p/8527448.html