第一个
第二个
$(function(){
var counter = 2;//开始加载
var num = 6;//每页数量
//容器外层
$('#content_drop').dropload({
scrollArea : window,
loadDownFn : function(me){
$.ajax({
type: 'GET',
url: 'index.php?p='+ counter,
dataType: 'json',
success: function(data){
if(data.status !=0){
// 锁定
me.lock();
// 无数据
me.noData();
} else {
var result = '';
counter++;
for(var i = 0; i < num; i++){
//处理内容
}
$('#content_list').append(result);
me.resetload();
}
},
error: function(xhr, type){
console.log('Ajax error!');
me.resetload();
}
});
}
});
});
参考:https://github.com/ximan/dropload
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有