62,046
社区成员
发帖
与我相关
我的任务
分享
function GetWeibo(IsFirst) {
var chatId = 0
if (IsFirst > 0)
{ chatId = $("div.weibo").last().attr("id"); }
$.ajax({
type: "get",
url: "/UserManage/ChatWeiboList",
data:"&chatId="+chatId,
error: function (res, status, ex) { alert("对不起,暂时不能获取内容"); },
success: function (cms) {
if (cms == "0") { alert("没有更久的数据了"); }
else {
//alert("动态信息载入成功,谢谢支持!");
if (IsFirst = 0)
{ $("#weibo").html(cms); }
else
{ $("#weibo").append(cms); }
}
}
});
}
$(function() {
$(window).bind("scroll", function() {
var top = document.documentElement.scrollTop + document.body.scrollTop;
var textheight = $(document).height();
var curnum = parseInt($("#hidtxtPdnum").val());
if (curnum >= 3) { $(".lodingBarStyle").remove(); }
if (textheight - top - $(window).height() <= 100) {
$("#hidtxtPdnum").val(curnum + 1);
if (curnum >= 3) {
return;
}
$.ajax({
type: "get",
url: "ajax/getInfo.aspx?ppage=" + curnum + "&acDate=" + (new Date().getTime()),
success: function(msg) {
var $boxes = $(msg);
$('#container').append($boxes).masonry('appended', $boxes, true);
},
error: function() {
alert("参数出错,刷新后重试");
return false;
}
});
}
});