话不多说直接文件 打包过来,需要的,可以参考[缺点就是不支持PHP7.x以上版本]
1,php直接放根目录.或其它文件夹.
注意里面的数据库表 要修改成自己的
在列表模板添加下面代码
php和数据表路径一定要对
还有就是要引入js文件
- <?php
- $num=$empire->gettotal("select count(*) as total from zhan_eCMS_game");
- $zongshu= $num – 25;
- $zhan_zongye = ceil($zongshu/25);
- ?>
- <scrIPt language="Javascript" type="text/JavaScript">
- $(function(){
- var pagenum = 1; //设置当前页数
- var zhan_zongpage=0;
- var totalheight = 0;
- var wan=true;
- function loadData(){
- totalheight = parseFloat($(window).height()) + parseFloat($(window).scrollTop());
- if ($(document).height()-200 <= totalheight && wan==true) {
- zhan_zongpage = <?=$zhan_zongye?>;
- var currentclass = <?=$GLOBALS[navclassid]?>;
- $.ajax({
- URL : ‘/zhan/game-getajax.php’,
- type:’get’,
- data:{"next":pagenum},
- dataType : ‘html’,
- beforeSend:function(){
- $(‘.preloader’).show();
- wan=false;
- },
- success : function(data){
- if(data!=”){
- $(‘.list’).Append(data);
- $(‘.preloader’).hide();
- pagenum++;
- wan=true;
- }else{
- $(‘#listLoader’).html(‘没有更多了’);
- return false;
- }
- }
- });
- }
- }
- $(window).scroll( function() {
- loadData();
- });
- });
- </script>
复制代码
感谢您的来访,获取更多精彩文章请收藏本站。
© 版权声明
THE END

















暂无评论内容