';
if(i==(total-1)){
strTxtB+='
';
}
}
if(currentPage==1){
$('#cont-more').prepend(strTxtB);
//$('.dyw18929-tablist .newvideo-cont .dyw18929-tongimg').css('display','block');
$('.dyw18929-tablist .newvideo-cont').css('display','block');
}else{
$('#cont-more').append(strTxtB);
}
zanurl+='&jsonp_callback=?&r='+Math.random();;
$.ajax({
url:zanurl,
type:"get",
dataType:"jsonp",
jsonp: "cb",
success: function(data){
var _obj=data.data;
for(var a in _obj){
if(_obj[a] <= 0){
var sjs = _videoObj._RandomNum(10, 90);
$("."+a).attr('dianzan_num',_obj[a]+sjs);
$("."+a).html(unitConversion(_obj[a]+sjs));
_videoObj._ajax("//api.itv.cntv.cn/praise/add?type=other&id="+a+"&num="+_obj[a]+sjs,'jsonp_callback','b'+a+sjs,function(){})
}else{
$("."+a).attr('dianzan_num',_obj[a]);
$("."+a).html(unitConversion(_obj[a]))
}
}
},
timeout:8000,
error:function(){ }
});
Echo.init({
offset: 0, //离可视区域多少像素的图片可以被加载
throttle:10 //图片延时多少毫秒加载
});
$('.dyw18929-tablist .newvideo-cont .dyw18929-newvideo ul li .jctj-xin .xin-right').unbind('click');
$('.dyw18929-tablist .newvideo-cont .dyw18929-newvideo ul li .jctj-xin .xin-right').one('click',function(){
if(!$(this).hasClass('xin-rightclick')){
var getDianzanNum = Number($(this).attr('dianzan_num'));
$(this).addClass('xin-rightclick');
$(this).html(unitConversion(getDianzanNum + 1));
$(this).siblings().addClass('addone').fadeIn(function(){
$(this).fadeOut();
});
var zanshu = $(this).attr('class').split(" ")[2];
_videoObj._ajax("//api.itv.cntv.cn/praise/add?type=other&id="+zanshu+"&num=1",'jsonp_callback','b',function(){
})
}
});
addPullLoaderEvent();
function addPullLoaderEvent() {
if(judgeisMobile()){
window.addEventListener('scroll', pullGetMore, false);//滚动条滚动执行addcomment方法
}else{
$(window).scroll(pullGetMore);
}
}
function pullGetMore(ev) {
var sTop = document.body.scrollTop || document.documentElement.scrollTop; //距离body的距离
var dHeight = $(document).height(), //文档的高度
cHeight = window.innerHeight; //可见内容区高度
var thisdivheight = $("#cont-more").height();
var alltopdivheight = $("#cont-more").offset().top;
var diHeight=dHeight-alltopdivheight-thisdivheight;
var ua = navigator.userAgent.toLowerCase();
if ((ua.indexOf('mqqbrowser') > -1 && ua.indexOf('android') > -1) || (navigator.userAgent.indexOf('UCBrowser') > -1 &&ua.indexOf('android') > -1)) {
cHeight = cHeight + 40; //上面菜单高度
}
if(dHeight-cHeight-diHeight <= sTop){
if(gundongs){
gundongs = false;
setTimeout(function(){
currentPage++;
if(currentPage<=50){
_videoObj._ajax(urll+"&p="+currentPage+"&n="+initialpage,'cb','t'+currentPage,cFun);
}else{
$(".dyw18929-loading").hide();
$(".dyw18929-loadingno").show();
}
},200);
}
}
}
}
_videoObj._ajax(urll+"&p="+currentPage+"&n="+initialpage,'cb','t'+new Date().getTime(),cFun)