jquery pagination插件动态分页实例(Bootstrap分页)


Posted in Javascript onDecember 23, 2016

第一种Bootstrap -默认的分页实例,供大家参考,具体内容如下

<!DOCTYPE html>
<html>
<head>
 <title>Bootstrap 实例 - 默认的分页</title>
 <link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
 <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
 <script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
</head>
<body>
<div ><h1>第1页</h1></div>
<ul class="pagination">
 <li><a href="1.html">«</a></li>
 <li><a href="1.html">1</a></li>
 <li><a href="2.html">2</a></li>
 <li><a href="3.html">3</a></li>
 <li><a href="#">4</a></li>
 <li><a href="#">5</a></li>
 <li><a href="#">»</a></li>
</ul>


</body>
</html>

第二个实例jquery pagination分页控件

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>Pagination Demo I - Simple pagination</title>
  <link rel="stylesheet" href="lib/pagination.css" />
  <link rel="stylesheet" href="demo.css" />
  <script type="text/javascript" src="lib/jquery-1.10.2.min.js"></script>
  <script type="text/javascript" src="lib/jquery.pagination.js"></script>
  <script type="text/javascript">
   function pageselectCallback(page_index, jq){
    var new_content = jQuery('#hiddenresult div.result:eq('+page_index+')').clone();
    $('#Searchresult').empty().append(new_content);
    return false;
   }
   
   function initPagination() {
    // count entries inside the hidden content
    var num_entries = jQuery('#hiddenresult div.result').length;
    // Create content inside pagination element
    $("#Pagination").pagination(num_entries, {
     callback: pageselectCallback,
     items_per_page:1 // Show only one item per page
    });
    }
   
   // When document is ready, initialize pagination
   $(document).ready(function(){  
    initPagination();
   });
  
  </script>
 </head>
 <body>
  
  
  <br style="clear:both;" />
  <div id="Searchresult">
   This content will be replaced when pagination inits.
  </div>
   <div class="searchresult_pagination"></div>
  <br style="clear:left;">
  <!-- Container element for all the Elements that are to be paginated -->
  <div id="hiddenresult" style="display:none;">
   <div class="result"><p>Globally maximize granular
    "outside the box" thinking vis-a-vis quality niches. Proactively formulate 24/7
    results whereas 2.0 catalysts for change. Professionally implement 24/365 niches
    rather than client-focused users.</p>
    <p>
    Competently engineer high-payoff "outside the box" thinking through cross
    functional benefits. Proactively transition intermandated processes through
    open-source niches. Progressively engage maintainable innovation and extensible
    interfaces.</p>
   </div>
   <div class="result"><p>Credibly fabricate e-business models for end-to-end niches.
    Compellingly disseminate integrated e-markets without ubiquitous services.
    Credibly create equity invested channels with multidisciplinary human capital.</p>
    <p>
    Interactively integrate competitive users rather than fully tested
    infomediaries. Seamlessly initiate premium functionalities rather than impactful
    architectures. Rapidiously leverage existing resource-leveling processes via
    user-centric portals.</p> 
   </div>
   <div class="result"><p>Monotonectally initiate unique
    e-services vis-a-vis client-centric deliverables. Quickly impact parallel
    opportunities with B2B bandwidth. Synergistically streamline client-focused
    infrastructures rather than B2C e-commerce.</p>
    <p>
    Phosfluorescently fabricate 24/365 e-business through 24/365 total linkage.
    Completely facilitate high-quality systems without stand-alone strategic theme
    areas.</p>
    </div>
    <div class="result"><p>Monotonectally initiate unique
    e-services vis-a-vis client-centric deliverables. Quickly impact parallel
    opportunities with B2B bandwidth. Synergistically streamline client-focused
    infrastructures rather than B2C e-commerce.</p>
    <p>
    Phosfluorescently fabricate 24/365 e-business through 24/365 total linkage.
    Completely facilitate high-quality systems without stand-alone strategic theme
    areas.</p>
    </div>
  </div>
 <div id="Pagination"></div>
 </body>
</html>

分页效果:

jquery pagination插件动态分页实例(Bootstrap分页)

源码:https://github.com/gbirke/jquery_pagination

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持三水点靠木。

Javascript 相关文章推荐
Javascript Object.extend
May 18 Javascript
鼠标放在图片上显示大图的JS代码
Mar 26 Javascript
在Ubuntu上安装最新版本的Node.js
Jul 14 Javascript
浅谈EasyUI中编辑treegrid的方法
Mar 01 Javascript
jQuery实现最简单的切换图效果【可兼容IE6、火狐、谷歌、opera等】
Sep 04 Javascript
jQuery EasyUI封装简化操作
Sep 18 Javascript
关于vue.extend和vue.component的区别浅析
Aug 16 Javascript
vue.config.js中配置Vue的路径别名的方法
Feb 11 Javascript
Vue CLI3移动端适配(px2rem或postcss-plugin-px2rem)
Apr 27 Javascript
vue-socket.io接收不到数据问题的解决方法
May 13 Javascript
vue 动态给每个页面添加title、关键词和描述的方法
Aug 28 Javascript
uniapp引入支付宝原生扫码插件步骤详解
Jul 23 Javascript
详解jQuery中的DOM操作
Dec 23 #Javascript
Bootstrap table两种分页示例
Dec 23 #Javascript
理解AngularJs篇:30分钟快速掌握AngularJs
Dec 23 #Javascript
Bootstrap和Java分页实例第二篇
Dec 23 #Javascript
js实现键盘自动打字效果
Dec 23 #Javascript
Angularjs实现分页和分页算法的示例代码
Dec 23 #Javascript
使用Bootstrap Tabs选项卡Ajax加载数据实现
Dec 23 #Javascript
You might like
PHP图片处理之使用imagecopy函数添加图片水印实例
2014/11/19 PHP
图片自动更新(说明)
2006/10/02 Javascript
jQuery中Ajax的load方法详解
2015/01/14 Javascript
jQuery实现炫酷的鼠标轨迹特效
2015/02/01 Javascript
JS实现点击文字对应DIV层不停闪动效果的方法
2015/03/02 Javascript
javascript结合canvas实现图片旋转效果
2015/05/03 Javascript
javascript实现仿腾讯游戏选择
2015/05/14 Javascript
jQuery实现选项卡切换效果简单演示
2015/12/09 Javascript
用js实现博客打赏功能
2016/10/24 Javascript
vue.js 1.x与2.0中js实时监听input值的变化
2017/03/15 Javascript
JavaScript实现无刷新上传预览图片功能
2017/08/02 Javascript
微信小程序左右滑动的实现代码
2017/12/15 Javascript
基于VuePress 轻量级静态网站生成器的实现方法
2018/04/17 Javascript
vue-cli项目中使用公用的提示弹层tips或加载loading组件实例详解
2018/05/28 Javascript
vue通过cookie获取用户登录信息的思路详解
2018/10/30 Javascript
3分钟读懂移动端rem使用方法(推荐)
2019/05/06 Javascript
微信小程序实现日历签到
2020/09/21 Javascript
[04:07]显微镜下的DOTA2第八期——英雄复活动作
2014/06/24 DOTA
python文件写入实例分析
2015/04/08 Python
python搭建微信公众平台
2016/02/09 Python
windows下安装Python的XlsxWriter模块方法
2018/05/03 Python
C#中有没有静态构造函数,如果有是做什么用的?
2016/06/04 面试题
如何定义一个可复用的服务
2014/09/30 面试题
医学检验专业个人求职信范文
2013/12/04 职场文书
新春联欢会主持词
2014/03/24 职场文书
个人查摆剖析材料
2014/10/04 职场文书
群众路线教育实践活动学习笔记内容
2014/11/06 职场文书
2014年效能监察工作总结
2014/11/21 职场文书
检讨书范文300字
2015/01/28 职场文书
餐饮食品安全责任书
2015/01/29 职场文书
面试通知邮件
2015/04/20 职场文书
毕业生爱心捐书倡议书
2015/04/27 职场文书
惊涛骇浪观后感
2015/06/05 职场文书
2019预备党员转正申请书模板2篇!
2019/08/07 职场文书
React四级菜单的实现
2022/04/08 Javascript
python 学习GCN图卷积神经网络
2022/05/11 Python