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 相关文章推荐
web页面数据展示新想法(json)
Jun 08 Javascript
分享14个很酷的jQuery导航菜单插件
Apr 25 Javascript
通过Javascript将数据导出到外部Excel文档的函数代码
Jun 15 Javascript
js 限制数字 js限制输入实现代码
Dec 04 Javascript
JavaScript学习笔记之Cookie对象
Jan 22 Javascript
谈谈js中的prototype及prototype属性解释和常用方法
Nov 25 Javascript
jquery学习笔记之无new构建详解
Dec 07 jQuery
深入浅析Vue中的 computed 和 watch
Jun 06 Javascript
angular将html代码输出为内容的实例
Sep 30 Javascript
JS实现的tab页切换效果完整示例
Dec 18 Javascript
vue模块拖拽实现示例代码
Mar 09 Javascript
微信小程序自定义菜单切换栏tabbar组件代码实例
Dec 30 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
自动把纯文本转换成Web页面的php代码
2009/08/27 PHP
PHP生成不重复随机数的方法汇总
2014/11/19 PHP
smarty模板引擎从配置文件中获取数据的方法
2015/01/22 PHP
php 类自动载入的方法
2015/06/03 PHP
PHP实现统计在线人数功能示例
2016/10/15 PHP
document.all与WEB标准
2020/05/13 Javascript
文本框中禁止非数字字符输入比如手机号码、邮编
2013/08/19 Javascript
jquery插件lazyload.js延迟加载图片的使用方法
2014/02/19 Javascript
在JavaScript的正则表达式中使用exec()方法
2015/06/16 Javascript
js验证真实姓名与身份证号是否匹配
2015/10/13 Javascript
jQuery插件AjaxFileUpload实现ajax文件上传
2016/05/05 Javascript
移动端触屏幻灯片图片切换插件idangerous swiper.js
2017/04/10 Javascript
JS实现将链接生成二维码并转为图片的方法
2018/03/17 Javascript
nuxt框架中路由鉴权之Koa和Session的用法
2018/05/09 Javascript
解决node-sass偶尔安装失败的方法小结
2018/12/05 Javascript
微信小程序实现复选框效果
2018/12/28 Javascript
微信小程序实现的图片保存功能示例
2019/04/24 Javascript
[39:11]DOTA2上海特级锦标赛C组资格赛#2 LGD VS Newbee第二局
2016/02/28 DOTA
[01:21]DOTA2新纪元-7.0新版本即将开启!
2016/12/11 DOTA
[08:08]DOTA2-DPC中国联赛2月28日Recap集锦
2021/03/11 DOTA
Python操作列表之List.insert()方法的使用
2015/05/20 Python
Mac PyCharm中的.gitignore 安装设置教程
2020/04/16 Python
Python基于template实现字符串替换
2020/11/27 Python
css实例教程 一款纯css3实现的超炫动画背画特效
2014/11/05 HTML / CSS
世界第一冲浪品牌:O’Neill
2016/08/30 全球购物
澳大利亚自然和有机的健康美容产品一站式商店:Ziani Beauty
2017/12/28 全球购物
《吃水不忘挖井人》教学反思
2014/04/15 职场文书
社区维稳工作方案
2014/06/06 职场文书
党支部2014年度工作总结
2014/12/04 职场文书
小学班级管理心得体会
2016/01/07 职场文书
2016开学第一课心得体会
2016/01/23 职场文书
2016年小学推普宣传周活动总结
2016/04/06 职场文书
nginx反向代理时如何保持长连接
2021/03/31 Servers
vue引入Excel表格插件的方法
2021/04/28 Vue.js
Vue-Element-Admin集成自己的接口实现登录跳转
2021/06/23 Vue.js
Python Flask搭建yolov3目标检测系统详解流程
2021/11/07 Python