Skip to content

一个不到150行代码实现的轻量级分页插件

Notifications You must be signed in to change notification settings

jinxuanzheng01/jq-paging

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jq 的分页插件

概述

一个简单实用的jq分页插件,该插件将ajax抽出只进行当前为第几页的计算,请在回调内自行写入ajax请求。

效果

preview

使用

1.html建立插入节点

    <div class="page-packing"></div>

2.引入jq和插件脚本

    <script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
    <script src="jxzPaging-1.1.1.js"></script>

3.调用脚本

    $('.page-packing').jxzPaging({
        pageSize: 3, // 每页数量
        totalNum: 100, // 总数
        callBack: function(currentPage) { // 回调 params: 当前页
            console.log(currentPage);
        }
    });

联系方式

如果你有好的意见或建议,欢迎加我的微信jin616347058,表示很乐意交流技术~~

QR code

About

一个不到150行代码实现的轻量级分页插件

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published