
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
k-pagination
Advanced tools
纯js分页插件,压缩版本~4kb,样式可以自定义
npm i k-pagination
import kPagination from 'k-pagination'
<div id="pagination"></div>
<script src="kPagination.min.js"></script>
<script>
new kPagination({
id: 'pagination',
currentPage: 1, // 当前页
totalPage: 20,
offset: 5,
showPrev: true,
showNext: true,
});
</script>
| 选项 | 类型 | 说明 |
|---|---|---|
| offset | number | 可以显示的按钮个数 |
| showPrev | boolean | 是否显示上一页按钮 |
| showNext | boolean | 是否显示下一页按钮 |
| jumpPage | boolean | 是否显示跳转输入框 |
| jumpText | string | 跳转按钮的文字 |
| pageChange | function | 页面触发回调 |
| afterRefresh | function | 重新渲染成功回调 |
| 选项 | 说明 |
|---|---|
| k-pagination-num-wrap | 分页容器样式 |
| k-pagination-input-wrap | 按钮容器样式 |
| k-pagination-num | 页码样式 |
| k-pagination-num-active | 激活样式 |
| k-pagination-disabled | 禁止样式 |
| k-pagination-num-input | 输入框样式 |
| k-pagination-jump-btn | 跳转按钮样式 |
| k-pagination-jump-dot | 省略号样式 |
FAQs
tiny plugin for pagination
We found that k-pagination demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.