jQuery分页插件Paginator
一个不错的jQuery分页插件Paginator,只需要配置相关的参数就能实现一个分页功能,实现的效果图如下:
![]()
使用说明
需要使用jQuery库文件和Paginator库文件
使用实例
一,包含文件部分
- <script type="text/javascript" src="jquery.min.js"></script>
- <script type="text/javascript" src="jquery.paginator.js"></script>
二,HTML部分
- <div id="paginator" class="pagination" style="margin-top:20px;margin-bottom:80px"></div>
- <div style="clear:both;">
- <div id="paginator_content"></div>
- </div>
三,Javascript部分
- <script type="text/javascript">
- $(function(){
- var options = {postUrl:"http://www.biuuu.com/paginator.php",
- itemsPerPage: 2,
- elementModel: [],
- currentPage: cpn,
- showPrev: true,
- showNext: true,
- showPageXofY : true,
- xofyLeft : true,
- xofyRight : false
- };
- $("#paginator").paginator(options);
- }
- });
- </script>
如上实例,通过配置相关参数,就实现了一个分页的功能,这个实例部分只提供了部分JS,具体可查看相关文档说明和实例
主要配置参数说明如下:
- items_per_page:10,
- num_display_entries:10,
- current_page:0,
- num_edge_entries:0,
- link_to:"#",
- prev_text:"Prev",
- next_text:"Next",
- ellipse_text:"...",
- prev_show_always:true,
- next_show_always:true,
- page_x_of_y:true,
- xofy_left:true,
- xofy_right:false,
- callback:function(){return false;}
这部分就是实现分页效果的全配置文件,可将其中的英文部分修改为中文。
点我下载Paginator源程序
http://jquerycodes.googlecode.com/files/jquery_paginator.zip
原创文章如转载,请注明:转载自 必优博客 http://www.biuuu.com/
本文链接地址:http://www.biuuu.com/p1211.html
Tags:jQuery Paginator jQuery分页
作者:biuuu | 分类:jQuery插件 | 评论:3 | 引用:0 | 浏览:1983































我要评论