注册 登录 充值会员 退出
联系客服 毕业设计 java源码 PHP源码
充值

jQuery基于EasyHelper分页插件

作者/代码整理:  (源码已亲测,不会安装的可以向QQ1915635791要安装视频教程) 发布日期:2024-04-22
jQuery基于EasyHelper分页插件
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>

关注公众号,免费赠送安装视频教程、环境和学习视频,后面会不断更新。