jquery 分页

2021-04-11 09:28

阅读:369

YPE html>

标签:content   tar   padding   cti   head   extern   back   oop   sheet   

简单实用且功能齐全的jQuery分页插件|DEMO_jQuery之家-自由分享jQuery、html5、css3的插件库

简单实用且功能齐全的jQuery分页插件 A jQuery plugin to provide simple yet fully customisable pagination

 

 
  lang="zh">
 
  charset="UTF-8">
  http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  name="viewport" content="width=device-width, initial-scale=1.0">
  简单实用且功能齐全的jQuery分页插件|DEMO_jQuery之家-自由分享jQuery、html5、css3的插件库
  rel="stylesheet" type="text/css" href="css/normalize.css" />
  rel="stylesheet" type="text/css" href="css/default.css">
  href="dist/pagination.css" rel="stylesheet" type="text/css">
  ="text/css">
  ul, li{
  list-style: none;
  }
  #wrapper{
  width: 900px;
  margin: 20px auto;
  }
  .data-container{
  margin-top: 5px;
  }
  .data-container ul{
  padding: 0;
  margin: 0;
  }
  .data-container li{
  margin-bottom: 5px;
  padding: 5px 10px;
  background: #66677c;
  color: #fff;
  }
 
 
 
 
class
="htmleaf-container">
 
class
="htmleaf-header">
 

简单实用且功能齐全的jQuery分页插件 A jQuery plugin to provide simple yet fully customisable pagination
 
class="htmleaf-links">
  class="htmleaf-icon icon-htmleaf-home-outline" href="http://www.htmleaf.com/" title="jQuery之家" target="_blank"> jQuery之家
  class="htmleaf-icon icon-htmleaf-arrow-forward-outline" href="http://www.htmleaf.com/jQuery/Menu-Navigation/201511202805.html" title="返回下载页" target="_blank"> 返回下载页
 
 
 
id="wrapper">
 
 
class="data-container">
 
id="pagination-demo1">
 
 
 
   
  ="js/jquery-1.10.2.min.js">
  ="dist/pagination.js">
 
  $(function(){
   
  function createDemo(name){
  var container = $(‘#pagination-‘ + name);
  var sources = function(){
  var result = [];
   
  for(var i = 1; i
  result.push(i);
  }
   
  return result;
  }();
   
  var options = {
  dataSource: sources,
  className: ‘paginationjs-theme-blue‘,
  callback: function(response, pagination){
  window.console && console.log(response, pagination);
   
  var dataHtml = ‘
    ‘;
   
  $.each(response, function(index, item){
  dataHtml += ‘
  • ‘+ item +‘
  • ‘;
      });
       
      dataHtml += ‘‘;
       
      container.prev().html(dataHtml);
      }
      };
       
      //$.pagination(container, options);
       
      container.addHook(‘beforeInit‘, function(){
      window.console && console.log(‘beforeInit...‘);
      });
      container.pagination(options);
       
      container.addHook(‘beforePageOnClick‘, function(){
      window.console && console.log(‘beforePageOnClick...‘);
      //return false
      });
       
      return container;
      }
       
      createDemo(‘demo1‘);
       
      });
     
     
     

    jquery 分页

    标签:content   tar   padding   cti   head   extern   back   oop   sheet   

    原文地址:https://www.cnblogs.com/roak/p/12417002.html

    上一篇:css3

    下一篇:确保Web安全的HTTPS


    评论


    亲,登录后才可以留言!