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 相关文章推荐
use jscript Create a SQL Server database
Jun 16 Javascript
Jquery阻止事件冒泡 event.stopPropagation
Dec 11 Javascript
jquery ajax提交整个表单元素的快捷办法
Mar 27 Javascript
javascript的parseFloat()方法精度问题探讨
Nov 26 Javascript
使用JS取得焦点(focus)元素代码
Mar 22 Javascript
jQuery中常用的遍历函数用法实例总结
Sep 01 Javascript
基于jQuery实现左右图片轮播(原理通用)
Dec 24 Javascript
浅谈js中字符和数组一些基本算法题
Aug 15 Javascript
一道面试题引发的对javascript类型转换的思考
Mar 06 Javascript
js实现股票实时刷新数据案例
May 14 Javascript
Vue的Flux框架之Vuex状态管理器
Jul 30 Javascript
jquery+css实现下拉列表功能
Sep 03 jQuery
详解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、mysql查询当天,查询本周,查询本月的数据实例(字段是时间戳)
2017/02/04 PHP
PHP $O00OO0=urldecode &amp; eval 解密,记一次商业源码的去后门
2020/09/13 PHP
你所要知道JS(DHTML)中的一些技巧
2007/01/09 Javascript
JS弹出对话框返回值代码(asp.net后台)
2010/12/28 Javascript
js 实现css风格选择器(压缩后2KB)
2012/01/12 Javascript
extjs表格文本启用选择复制功能具体实现
2013/10/11 Javascript
jQuery中removeClass()方法用法实例
2015/01/05 Javascript
JQuery中使文本框获得焦点的方法实例分析
2015/02/28 Javascript
深入理解JavaScript中的预解析
2017/01/04 Javascript
微信小程序 聊天室简单实现
2017/04/19 Javascript
vue中$refs的用法及作用详解
2018/04/24 Javascript
在angular 6中使用 less 的实例代码
2018/05/13 Javascript
详解Angular模板引用变量及其作用域
2018/11/23 Javascript
Vue使用Clipboard.JS在h5页面中复制内容实例详解
2019/09/03 Javascript
js使用文档就绪函数动态改变页面内容示例【innerHTML、innerText】
2019/11/07 Javascript
Vue学习笔记之计算属性与侦听器用法
2019/12/07 Javascript
微信小程序用户盒子、宫格列表的实现
2020/07/01 Javascript
[13:55]Newbee vs Team Spirit
2018/06/07 DOTA
python正则表达式re模块详解
2014/06/25 Python
用Python代码来绘制彭罗斯点阵的教程
2015/04/03 Python
Python易忽视知识点小结
2015/05/25 Python
python学习笔记之列表(list)与元组(tuple)详解
2017/11/23 Python
利用python将json数据转换为csv格式的方法
2018/03/22 Python
浅谈python的dataframe与series的创建方法
2018/11/12 Python
Python3.6中Twisted模块安装的问题与解决
2019/04/15 Python
Python pandas DataFrame操作的实现代码
2019/06/21 Python
localstorage和sessionstorage使用记录(推荐)
2017/05/23 HTML / CSS
美国隐形眼镜零售商:LensPure
2019/03/10 全球购物
生物医学工程专业学生求职信范文分享
2013/12/14 职场文书
国培教师自我鉴定
2014/02/12 职场文书
秋天的图画教学反思
2014/05/01 职场文书
幼儿园教师师德师风演讲稿:我自豪我是一名幼师
2014/09/10 职场文书
2014乡镇干部对照检查材料思想汇报
2014/09/26 职场文书
党的群众路线教育实践活动先进个人材料
2014/12/24 职场文书
python中取整数的几种方法
2021/11/07 Python
详细介绍python操作RabbitMq
2022/04/12 Python