'; } } $(".con_c_c ul").append(htmlstr); if(data.length < 5){ $(".addmore").hide(); $(".message").show(); } isup++; pfl(); } }) } function showimg() { $("#wechatimg").css("display","block"); } function hiddenimg() { $("#wechatimg").css("display","none"); } function shot() { $("#shot").attr("class","online"); $("#lot").attr("class","flash"); $(".bd").animate({top:"0px"}); } function lot() { $("#shot").attr("class","flash"); $("#lot").attr("class","online"); $(".bd").animate({top:"-225px"}); } function jsDateDiff(publishTime){ var d_minutes,d_hours,d_days; var timeNow = parseInt(new Date().getTime()/1000); var d; d = timeNow - publishTime; d_days = parseInt(d/86400); d_hours = parseInt(d/3600); d_minutes = parseInt(d/60); if(d_days>0 && d_days<20){ return d_days+"天前"; }else if(d_days<=0 && d_hours>0){ return d_hours+"小时前"; }else if(d_hours<=0 && d_minutes>0){ return d_minutes+"分钟前"; }else if(d_days >= 4){ var s = new Date(publishTime*1000); // s.getFullYear()+"年"; return (s.getMonth()+1)+"月"+s.getDate()+"日"; }else{ return"刚刚"; } } $(function () { $('#art').hover(function(){ $('.prev_img').css("display","block"); $('.next_img').css("display","block"); },function(){ $('.next_img').css("display","none"); $('.prev_img').css("display","none"); }); });