function get_more(){
$('.more span').text('加载中...');
$.ajax({
type: "POST",
url: "{:U('Wall/MoreExpress')}",
data: {
last:$('#last_id').val(),
p:page,
keyword:"{$keyword}"
},
dataType: "json",
success: function(data){
var count = getPropertyCount(data);
if(count > 0){
start_y = 0;
end_y = 0;
page++;
var html = $('#clone').html();
var rep = '';
$.each(data, function(i,e){
$('#last_id').val(e.id);
rep += html.replace('{1}',e.href);
rep = rep.replace('{2}',e.object);
rep = rep.replace('{3}',e.ymd);
rep = rep.replace('{4}',e.hi);
rep = rep.replace('{5}',e.comment);
rep = rep.replace('{6}',e.express);
rep = rep.replace('{7}',e.source);
});
$('.main_section').append(rep);
$('.more span').text('加载更多');
}else{
$('.more span').text('全部加载完毕');
}
}
});
}
相关分类