<script type="text/javascript">
$(function(){
var loading = $("#loading").data("on", false);
$(window).scroll(function(){
if(loading.data("on")) return;
if($(document).scrollTop() >
$(document).height()-$(window).height()-$('.footer').height()+100){
//加载更多数据
loading.data("on", true).fadeIn();
$.get(
'/index.php/Index/getMoreVideo',
{"last_id" : $("#container>div:last").attr("id")},
function(data){
var html = "";
if($.isArray(data)){
for(i in data){
if(data[i]['tid']>0){
var team_txt = "<a href='/team/"+data[i]['tid']+".html' target='_blank' title='"+data[i]['tname']+"'>"+data[i]['tname']+"</a>";
}else{
var team_txt = "<a href='void(0)' οnclick='return false' target='_blank' title='暂未分配舞队'>暂未分配舞队</a>";
}
html += "<div class=\"item\" id=\""+data[i].vid+"\"><a href=\"/video/"+data[i].vid+".html\" target=\"_blank\"><img src=\""+data[i].video_images+"\" width=\"176\" height=\"115\" alt=\""+data[i].vtitle+"\" /></a><a href=\"/video/"+data[i].vid+".html\" target=\"_blank\" class=\"tit\" title=\""+data[i].vtitle+"\">"+data[i].vtitle+"</a><p><span class=\"author_ico\" title=\"上传者\"></span><span class=\"author\"><font color=\"#E63737\">"+data[i].nickname+"</font></span></p> <p><span class=\"group_ico\" title=\"所属舞队\"></span><span class=\"group\">"+team_txt+"</span></p><p class=\"twos\"><span class=\"playNum_ico\" title=\"播放数\"></span><span class=\"playNum\">"+data[i].playNum+"</span><span class=\"pinglun_ico\" title=\"评论数\"></span><span class=\"pinglun\">"+data[i].fnum+"</span></p></div>";
}
$("#container").append(html);
loading.data("on", false);
}
loading.fadeOut();
},
"json"
);
}
});
});
</script>