jQuery基于EasyHelper分页插件是一款内容分页区块功能效果,支持显示总数据量和跳转、默认处于指定页码。
js代码
<script src=\"js/jquery.min.js\"></script> <script src=\"js/jquery.transit.min.js\"></script> <script src=\"js/es6-shim.min.js\"></script> <script src=\"js/easyhelper.min.js\"></script> <script> // 本地模拟的内容生成函数 var $content = $( \".content\" ); function createContent ( i, index ) { $content.eq( index ).empty().html( (\'<li>\' + i + \'</li>\').repeat(10) ); } // 调用分页功能 [ 基础版 ] Helper.ui.page(\"#page-1\", { total: 2000, pageSize: 10, change: function ( i ) { createContent( i, 0 ); } }); Helper.ui.page(\"#page-2\", { total: 2000, pageSize: 10, showTotal: true, change: function ( i ) { createContent( i, 1 ); } }); Helper.ui.page(\"#page-3\", { total: 2000, pageSize: 10, showTotal: true, showTo: true, change: function ( i ) { createContent( i, 2 ); } }); Helper.ui.page(\"#page-4\", { total: 2000, pageSize: 10, showTotal: true, showTo: true, currentPage: 25, change: function ( i ) { createContent( i, 3 ); } }); </script>
暂无评论内容