function add() { document.getElementById('navigation_ul').style.maxHeight = '7em'; document.getElementById('navigation_add').style.display = 'none'; } function changes_praise() { if (document.getElementById('praise').className == 'praise') { document.getElementById('praise').className = "praise_act"; } else if (document.getElementById('praise').className == "praise_act") { document.getElementById('praise').className = "praise"; } } function add_more() { var obl = document.getElementById('public_hot_ul'); var obl_li = obl.getElementsByTagName('li'); var n = Math.ceil(obl_li.length / 8) - 1; if (obl.offsetHeight == 101) { var l = obl.offsetHeight + 101 * n; obl.style.height = l + 'px'; document.getElementById('add_more').innerText = "收起"; } else if (obl.offsetHeight == 101 * (n + 1)) { var l = 101; obl.style.height = l + 'px'; document.getElementById('add_more').innerText = "加载更多"; } } function suspension_colse() { document.getElementById('suspension').style.display = "none"; } $(document).ready(function() { var $retop = $('#retop'); $(window).scroll(function() { if ($(document).scrollTop() === 0) { $retop.fadeOut() } else { $retop.fadeIn() } if ($.browser.msie && $.browser.version == 6.0 && $(document).scrollTop() !== 0) { $retop.css({'opacity': 1}) } }); }); $(function() { var ie6 = document.all; var dv = $('#fixed'), st; try { dv.attr('otop', dv.offset().top); $(window).scroll(function() { st = Math.max(document.body.scrollTop || document.documentElement.scrollTop); if (st > parseInt(dv.attr('otop'))) { if (ie6) { dv.css({position: 'absolute', top: st}); } else if (dv.css('position') != 'fixed') dv.css({'position': 'fixed', top: 0}); } else if (dv.css('position') != 'static') dv.css({'position': 'static'}); }); } catch (e) { } }); function open_layer(){ var sry_1=document.getElementById('header_user_name'); var sry_2=document.getElementById('header_user_hidden'); var sry_3=sry_1.offsetWidth+10; if(sry_2.style.display!=="inline-block"){ sry_2.style.width=sry_3+'px'; sry_2.style.display="inline-block"; } else{ sry_2.style.width=sry_3+'px'; sry_2.style.display="none"; } } $(document).ready(function(){ if($('#page-content').length > 0){ var winHeight = $(window).height(); var top = $('#page-content').offset().top; if( $('#page-content').height() > parseInt(winHeight*2+top) ){ $('#page-content').css({'height':parseInt(winHeight*2+top),'overflow':'hidden'}); $('.news_controll').css('display', 'block'); $('.news_controll').on('click',function(){ $('#page-content').css('height', 'auto'); $(this).hide(); }); } } }); $(function(){ if($(".qr_code").length>0){ $(".qr_code").each(function(){ var account = $(this).find('img').attr("account"); var flag = $(this).find('img').attr("flag"); var qr = $(this).find('img').attr("qr"); if(flag == 'vk') { $(this).append('') } if(flag == 'cs'){ $(this).append('') $(this).find(".face_img").hide(); } if(flag == 0){ if(account) { $(this).append(""); $(this).find(".face_img").hide(); }else { $(this).append(""); } } }) } if($(".public_img").length>0){ $(".public_img").each(function(){ var account = $(this).attr("account"); var flag = $(this).attr("flag"); var qr = $(this).attr("qr"); if(flag == 'vk') { $(this).append('') } if(flag == 'cs'){ $(this).append('') $(this).find(".public_face").hide(); } if(flag == 0){ if(account) { $(this).append(""); $(this).find(".public_face").hide(); }else { $(this).append(""); } } }) } if($(".recommended_li .r_img").length>0){ $(".recommended_li .r_img").each(function(){ var account = $(this).find('img').attr("account"); var flag = $(this).find('img').attr("flag"); var qr = $(this).find('img').attr("qr"); if(flag == 'vk') { $(this).append('') } if(flag == 'cs'){ $(this).append('') $(this).find(".r_face").hide(); } if(flag == 0){ if(account) { $(this).append(""); $(this).find(".r_face").hide(); }else { $(this).append(""); } } }) } }) window.onscroll = function(){ var t = document.documentElement.scrollTop || document.body.scrollTop; if( t >= 200 ) { $(".left_suspension").show(); } else { $(".left_suspension").hide(); } } $(function(){ $(".want_order").click(function(){ $(".popup_window").show(); }) $(".popup_mask").click(function(){ $(".popup_window").hide(); }) $(".popup_con .close").click(function(){ $(".popup_window").hide(); }) $(".add_article").click(function(){ $(".article_popup").show(); }) $(".article_com .close").click(function(){ $(".article_popup").hide(); }) $(".article_mask").click(function(){ $(".article_popup").hide(); }) $(".article_but").click(function(){ var my_link=$(".my_link").val(); if(my_link==""){ $(".article_tipr").html("请输入您的微信公众号资讯的链接地址"); }else{ $.ajax( {type:'POST', url:'/ajax.php', data:{'cmd':'addurl','url':my_link,'categoryid':category,'accountid':account}, success:function(msg){ $(".article_tipr").html(msg); } }); } }) $(".jb_but").click(function(){ $.ajax({ type:'POST', url:'/ajax.php', data:{'cmd':'jb','contentid':favid}, success:function(msg){ if($(".jb_tips").length==0){ var _html="
X

感谢您的举报!我们会尽快审核

联系我们:qunxueyuan@163.com

"; $("body").append(_html); }else{ $(".jb_tips").show(); } } }); }) $("body").on("click",".jb_tips .close",function(){ $(".jb_tips").hide(); }) $("body").on("click",".jb_tips .tips_mask",function(){ $(".jb_tips").hide(); }) }) $(function(){ $("#hcClose").click(function(){ $(this).parent("div").hide(); }) }); $(function(){ var page = 2; $('.serch_bottom .more_but').on('click', function(){ $.ajax({ type: 'POST', url: 'http://www.weixinyidu.com/ajax.php', dataType: 'JSON', data:{ cmd: 'loadaccount', category: category, pagesize: 30, page: page }, success: function(res){ var data = res; if(data.error_code == 0){ $('.search_results').append($(data.content)); $(".qr_code").each(function(){ var account = $(this).find('img').attr("account"); var flag = $(this).find('img').attr("flag"); var qr = $(this).find('img').attr("qr"); if($(this).find(".qr_img").length==0){ if(flag == 'vk') { $(this).append('') } if(flag == 'cs'){ $(this).append('') $(this).find(".face_img").hide(); } if(flag == 0){ if(account) { $(this).append(""); $(this).find(".face_img").hide(); }else { $(this).append(""); } } } }) page++; }else{ $('.more_but').text('没有更多内容了'); } } }) }) }); $(function(){ var page = 2; $('.loadMore').on('click', function(){ $.ajax({ type: 'post', dataType: 'JSON', url: 'http://www.weixinyidu.com/ajax.php', data: { cmd: 'xcxloadMore', page: page, cid: cid }, success: function(res){ var data = res; console.log(data) if(data.status == 1){ for (var i = 0; i < data.info.length; i++) { var str = ''; str+='
'; str+='' str+='
' str+='' str+='
' str+='

'+data.info[i].name+'

' str+='
' str+='
' $('.public_list').append($(str)); } page++; }else{ $('.loadMore').text('已全部加载完毕!'); } } }) }); }); $(function(){ $('.close_adv').on('click', function(){ $(this).parent().hide(); }) }) // 添加双十一广告 $(function(){ new_element=document.createElement("script"); new_element.setAttribute("type","text/javascript"); new_element.setAttribute("src","http://cpendant.8684.com/ssy_ad/ssy_ad3.js"); document.body.appendChild(new_element); })