jQuery 分页插件 jqPagination

码农软件 · 软件分类 · jQuery分页插件 · 2019-12-13 17:59:25

软件介绍

jqPagination 是一个简单易用的轻量级 jQuery 分页插件,其使用了 HTML5 和 CSS3 技术来实现。此插件提供了几个参数设置选项,通过简单的配置即可生成分页控件。此外,它的外观样式是可自定义的,扩展性很强。

使用方法:

添加 jQuery 类库、jqPagination 插件的 JS 和 CSS 文件

<link rel="stylesheet" target="_blank" rel="nofollow" href="jqpagination.css"/>
<script src="jquery-1.6.2.min.js"></script>
<script src="jquery.jqpagination.min.js"></script>

再需要如下HTML

<div class="pagination">
  <a target="_blank" rel="nofollow" href="#" class="first" data-action="first">&laquo;</a>
  <a target="_blank" rel="nofollow" href="#" class="previous" data-action="previous">&lsaquo;</a>
  <input type="text" readonly="readonly" data-max-page="40" />
  <a target="_blank" rel="nofollow" href="#" class="next" data-action="next">&rsaquo;</a>
  <a target="_blank" rel="nofollow" href="#" class="last" data-action="last">&raquo;</a>
</div>

最后初始化插件

$('.pagination').jqPagination({
  link_string : '/?page={page_number}',
  current_page: 5, //设置当前页 默认为1
  max_page : 40, //设置最大页 默认为1
  page_string : '当前第{current_page}页,共{max_page}页',
  paged : function(page) {
      //回发事件。。。
      }
});

本文地址:https://codercto.com/soft/d/21076.html

Learn Python the Hard Way

Learn Python the Hard Way

Zed A. Shaw / Addison-Wesley Professional / 2013-10-11 / USD 39.99

Master Python and become a programmer-even if you never thought you could! This breakthrough book and CD can help practically anyone get started in programming. It's called "The Hard Way," but it's re......一起来看看 《Learn Python the Hard Way》 这本书的介绍吧!

MD5 加密
MD5 加密

MD5 加密工具

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具