`;
$('.tupianpindao20973_ind02 .con ul').append(itemHtml);
}
}
if(page >= 13){
moreEl.classList.remove('loading');
pEl.textContent = '已无更多内容';
}else{
loading = true;
pEl.textContent = '加载更多...';
}
},
error: function(error) {
console.error('Error fetching data:', error);
}
});
}
var first1 = true; //初次加载为true,加载后为false
var isFirstInit = true;
if (isFirstInit) {
getData();
//添加,上拉加载更多监听
addPullLoaderEvent();
isFirstInit = false;
}
//绑定上拉
function addPullLoaderEvent() {
window.addEventListener('scroll', pullGetMore, false); //滚动条滚动执行addcomment方法
}
//上拉加载事件
function pullGetMore(ev) {
var sTop = document.body.scrollTop || document.documentElement.scrollTop; //距离body的距离
var dHeight = $(document).height(), //文档的高度
cHeight = $(window).height(); //可见内容区高度
var shangpanyi = $(".tupianpindao20973_ind02 .con ul").offset().top;
var modelHeight = $(".tupianpindao20973_ind02 .con ul").height();
var ua = navigator.userAgent.toLowerCase();
if ((ua.indexOf('mqqbrowser') > -1 && ua.indexOf('androids') > -1) || (navigator.userAgent.indexOf('UCBrowser') > -1 &&ua.indexOf('androids') > -1)) {
cHeight = cHeight + 40; //上面菜单高度
}
if (sTop > shangpanyi + modelHeight - cHeight) {
if (loading) {
if (page*20 < total && page < 13) {
loading = false;
setTimeout(function() {
page++;
getData();
loading = true;
}, 1000);
} else {
if (first1) {
moreEl.classList.remove('loading');
$(".tupianpindao20973_ind02 .con .more").text("已无更多内容");
first1 = false;
}
}
}
}
}
同题浏览
以下内容与「威廉希尔官网成为德甲联赛的官方合作伙伴」同属公开资讯,可按栏目扩展阅读相关条目。 更多阅读
本站按公开材料组织页面。需要原文时请核对应栏目发布页。
继续浏览时优先选择同栏目或相近主题,避免被站外镜像带偏。 继续了解
- 国际
- “口袋公园” 装满市民“微幸福”
- 法治
- 社会
- 新闻
- 国内
- 湖北房县:路网联通助力乡村振兴
- 浙江淳安:千岛湖生态浮岛秋种有序展开
栏目一览
图片 / 专题 / 经济 / 文娱 / 人物 / 主页