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中“+=”的应用
Feb 02 Javascript
关于捕获用户何时点击window.onbeforeunload的取消事件
Mar 06 Javascript
JavaScript 用cloneNode方法克隆节点的代码
Oct 15 Javascript
javascript转换静态图片,增加粒子动画效果
May 28 Javascript
js实现用户离开页面前提示是否离开此页面的方法(包括浏览器按钮事件)
Jul 18 Javascript
AngularJS中的Promise详细介绍及实例代码
Dec 13 Javascript
Node.js 回调函数实例详解
Jul 06 Javascript
node.js中http模块和url模块的简单介绍
Oct 06 Javascript
小程序实现授权登陆的解决方案
Dec 02 Javascript
vue - vue.config.js中devServer配置方式
Oct 30 Javascript
es6中new.target的作用和使用场景简单示例分析
Mar 14 Javascript
Vue 根据条件判断van-tab的显示方式
Aug 03 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网站在线人数统计
2008/04/09 PHP
php 将bmp图片转为jpg等其他任意格式的图片
2009/06/29 PHP
PHP学习之数组值的操作
2011/04/17 PHP
php数组函数序列之array_keys() - 获取数组键名
2011/10/30 PHP
使用 PHPStorm 开发 Laravel
2015/03/24 PHP
laravel框架的安装与路由实例分析
2019/10/11 PHP
JQuery最佳实践之精妙的自定义事件
2010/08/11 Javascript
深入讲解AngularJS中的自定义指令的使用
2015/06/18 Javascript
JS脚本实现动态给标签控件添加事件的方法
2016/06/02 Javascript
JS限制条件补全问题实例分析
2016/12/16 Javascript
Javascript blur与click冲突解决办法
2017/01/09 Javascript
jQuery模拟实现天猫购物车动画效果实例代码
2017/05/25 jQuery
Vue开发实现吸顶效果的示例代码
2018/08/21 Javascript
vue中v-for循环给标签属性赋值的方法
2018/10/18 Javascript
vue中将html字符串转换成html后遇到的问题小结
2018/12/10 Javascript
js实现图片区域可点击大小随意改变(适用移动端)代码实例
2019/09/11 Javascript
Node.js实现简单管理系统
2019/09/23 Javascript
vue遍历对象中的数组取值示例
2019/11/07 Javascript
Python模块学习 re 正则表达式
2011/05/19 Python
重命名批处理python脚本
2013/04/05 Python
python中正则的使用指南
2016/12/04 Python
Python定义函数功能与用法实例详解
2019/04/08 Python
详解python pandas 分组统计的方法
2019/07/30 Python
python中count函数简单的实例讲解
2020/02/06 Python
Python GUI编程学习笔记之tkinter事件绑定操作详解
2020/03/30 Python
Python 实现劳拉游戏的实例代码(四连环、重力四子棋)
2021/03/03 Python
CSS3+font字体文件实现圆形半透明菜单具体步骤(图解)
2013/06/03 HTML / CSS
利用html5的websocket实现websocket聊天室
2013/12/12 HTML / CSS
Chemist Warehouse官方海外旗舰店:澳洲第一连锁大药房
2017/08/25 全球购物
英国剑桥包中文官网:The Cambridge Satchel Company中国
2018/11/06 全球购物
商务英语专业自荐信
2013/10/14 职场文书
校园报刊亭的创业计划书
2014/01/02 职场文书
小学教师自我鉴定范文
2014/03/20 职场文书
环保建议书500字
2014/05/14 职场文书
人身意外保险授权委托书
2014/10/01 职场文书
JavaScript实现一键复制内容剪贴板
2022/07/23 Javascript