jQuery+EasyHelper分页插件

来源:https://www.sucaihuo.com/js/4009.html 2018-10-29 11:57浏览(678) 收藏

jQuery+EasyHelper分页插件是一款强大实用的网页分页代码,实现内容分页区块功能。
jQuery+EasyHelper分页插件
分类:html/css > 分页 难易:初级
查看演示 下载资源 下载积分: 20 积分

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>
评论0
头像

系统已开启自动识别垃圾评论机制,识别到的自动封号,下载出错或者资源有问题请联系全栈客服QQ 1915635791

1 2