{ height: _height } ,"slow"); $('.lbxxyx_s').html('[收起目录]'); }else{ $("#newlist").animate( { height:440} ,"slow"); $('.lbxxyx_s').html('[打开目录]'); } }); }); var isDesc=1;function reverse(obj){var that=this;var dl=$("#newlist");var list=dl.children();dl.empty();isDesc^=1;$(obj).text(isDesc?"[点击倒序]":"[点击正序]");for(var i=list.length-1;i>=0;i--){var copy=list.eq(i).clone();dl.append(copy)}} function vote(aid, maxnum){ if($.cookie('ss_userid') && $.cookie('PHPSESSID') != -1) { if ($.cookie('articlevote') >= maxnum){ alert('推荐票 ( '+maxnum+' ) 已用完, 请明日再来.'); return; } $.ajax({ type: 'post' ,url: '/api/articlevisit.php' ,data: { vote: true ,articleid: aid } ,success: function(data){ if (data == '200') { tmpstr = $.cookie('articlevote') + ' / ' + maxnum; alert('推荐成功: ( '+tmpstr+' )'); } else { alert ('推荐失败'); } } }) }else{ if (window.confirm("\n当前功能需要登录才能使用,转到登录页面吗?")) { window.location.href = "/login/"; }else{ return; } } } function report() { if($.cookie('report')){ alert('请不要过于频繁,秒可操作一次'); return false; } else { let date = new Date(); date.setTime(date.getTime() + (parseInt() * 1000)); //n秒一次. $.cookie('report', true, {expires: date, path: '/'}) $.ajax({ type:"post" ,url:"/api/report.php?do=report" ,data:{ articleid : '520188' ,chapterid : '' ,articlename : '爸,公司上市了,你考试及格了吗?' ,chaptername : '' ,repurl : window.location.href }, success:function(state){ state == '200' ? alert('成功!\n我们会尽快处理!\n感谢您对本站的支持') : alert('失败!\n请联系网站管理员'); } }); } }