{"id":16489909,"url":"https://github.com/alex-xd/jquery-pagination","last_synced_at":"2025-03-23T12:34:36.662Z","repository":{"id":57282257,"uuid":"72092870","full_name":"Alex-xd/jquery-pagination","owner":"Alex-xd","description":"轻量易用、可自定义化的jquery分页插件^ ^   DEMO→","archived":false,"fork":false,"pushed_at":"2017-03-01T15:00:06.000Z","size":41,"stargazers_count":8,"open_issues_count":1,"forks_count":10,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T20:40:39.840Z","etag":null,"topics":["jquery","pageindex","pager","pagination"],"latest_commit_sha":null,"homepage":"https://alex-xd.github.io/jquery-pagination/DEMO.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Alex-xd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-27T09:29:48.000Z","updated_at":"2022-07-05T08:29:07.000Z","dependencies_parsed_at":"2022-09-19T15:04:42.448Z","dependency_job_id":null,"html_url":"https://github.com/Alex-xd/jquery-pagination","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alex-xd%2Fjquery-pagination","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alex-xd%2Fjquery-pagination/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alex-xd%2Fjquery-pagination/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alex-xd%2Fjquery-pagination/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Alex-xd","download_url":"https://codeload.github.com/Alex-xd/jquery-pagination/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245104460,"owners_count":20561377,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jquery","pageindex","pager","pagination"],"created_at":"2024-10-11T13:45:47.825Z","updated_at":"2025-03-23T12:34:36.351Z","avatar_url":"https://github.com/Alex-xd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## jquery.pagination.js\n\n[![lisence](https://img.shields.io/badge/LISENCE-MIT-green.svg)](https://github.com/Alex-xd/jquery-pagination)\n\n\u003e A light 、highly customizability and very easy use jquery plugin for pagination ^ ^\n\n![preview](http://o6x2vif88.bkt.clouddn.com/Screen%20Shot%202016-10-29%20at%2001.04.52.png)\n\n压缩后仅为4kb\n\n- 多条件动态分页实例\n- 提供多种API接口以供扩展功能\n- 自定义回调函数支持\n- 可自定义页码显示数量\n- 可自定义按钮名称\n- 可选的省略号、首页尾页按钮\n- 样式完全可自定义化（默认不加载任何样式，干净利落，根据需求添加样式）\n- 所有元素类名可自定义\n\n\n## Usage\n\n**方法一：直接引入**\n\n```html\n\u003cscript src=\"jquery.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"jquery.pagination.min.js\"\u003e\u003c/script\u003e\n\n\u003cdiv id=\"pager\"\u003e\u003c/div\u003e\n\n\u003cscript\u003e\n//这里列出了4个常用的设置，不设置就采用默认配置\nvar pager = $('#pager').paginate({\n        pageIndex: 0, //当前页数\n        totlePageCount: 16, //总页数\n        maxBtnCount: 7, //按钮数量最多有\n        styleURL: './defaultStyles/style1.css' //样式路径 默认无样式\n});\n\u003c/script\u003e\n```\n\n\u003cbr\u003e\n**方法二：npm安装**\n\n`npm install jquery-pagination` \n\n## You want More\n\n#### 可选配置和API\n\n|名称|类型|作用|默认值|\n|--- |---|---|---|\n|pageIndex|Number|当前页码|0|\n|totlePageCount|Number|总页码|16|\n|maxBtnCount|Number|最大显示按钮数量|7|\n|hasDots|Boolean|是否显示省略号|true|\n|hasFirstLast|Boolean|是否开启首尾页跳转功能|true|\n|styleURL|String|自定义样式路径（默认不加载样式）|空字符串|\n|btnClass|String|数字按钮类名|'pager-numbtn'|\n|pageTurnClass|String|翻页按钮类名|'pager-turnbtn'|\n|firstLastClass|String|首页尾页按钮类名|'pager-flbtn'|\n|prevPageName|String|\"上一页\"标签文字|'prev'|\n|nextPageName|String|\"下一页\"标签文字|'next'|\n|firstPageName|String|\"首页\"标签文字|'First Page'|\n|lastPageName|String|\"尾页\"标签文字|'Last Page'|\n\n\u003cbr\u003e\n## API\n先创建实例\n\n```javascript\nvar pager = $('#pager').paginate();\n```\n\n\n### pager.set(option, value)\n更改配置属性\n\n@param {String} option 要设置的配置属性\n\n@param {String}{Number}{Boolean} value 要设置的值\n\n\n### pager.getPageIndex()\n\n获取当前页\n\n@param  {Number} pageIndex 要跳转到的页码（值为实际页码减一，如：跳到第3页就传入2）\n\n### pager.turnToPage(pageIndex)\n\n跳转页码\n\n@param  {Number} pageIndex 要跳转到的页码（值为实际页码减一，如：跳到第3页就传入2）\n\n\u003cbr\u003e\n\n## LISENCE\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex-xd%2Fjquery-pagination","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falex-xd%2Fjquery-pagination","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex-xd%2Fjquery-pagination/lists"}