//微信显示 $(document).ready(function(e) { $(".ch-weixin-con1").hide(); $(".ch-weixin1").mousemove(function(){ $(".ch-weixin-con1").show(); }) $(".header-links-tp1").mouseleave(function(){ $(".ch-weixin-con1").hide(); }) $(".ch-weixin-con2").hide(); $(".ch-weixin2").mousemove(function(){ $(".ch-weixin-con2").show(); }) $(".header-links-tp2").mouseleave(function(){ $(".ch-weixin-con2").hide(); }) }); //$(function() { // $.fn.manhuatotop = function(options) { // var defaults = { // showheight : 150, // speed : 1000 // }; // var options = $.extend(defaults,options); // $("body").prepend("
返回
"); // var $totop = $(this); // var $top = $("#totop"); // var $ta = $("#totop a"); // $totop.scroll(function(){ // var scrolltop=$(this).scrolltop(); // if(scrolltop>=options.showheight){ // $top.show(); // } // else{ // $top.hide(); // } // }); // $ta.hover(function(){ // $(this).addclass("cur"); // },function(){ // $(this).removeclass("cur"); // }); // $top.click(function(){ // $("html,body").animate({scrolltop: 0}, options.speed); // }); // } //}); ////调用 //$(function (){ // $(window).manhuatotop({ // showheight : 100,//设置滚动高度时显示 // speed : 500 //返回顶部的速度以毫秒为单位 // }); //}); //加入收藏 function addfavorite(surl, stitle){try{window.external.addfavorite(surl, stitle);}catch (e){try{window.sidebar.addpanel(stitle, surl, "");}catch (e){alert("加入收藏失败,请使用ctrl+d进行添加");}}} //设为首页 function sethome(obj,vrl){try{obj.style.behavior='url(#default#homepage)';obj.sethomepage(vrl);}catch(e){alert("设为首页失败\n请使用ie浏览器或者360浏览器切换成兼容模式");}} //设为内页左侧div和右侧div一样高 //window.onload=function(){document.getelementbyid("main_left").style.height = document.getelementbyid("main_right").offsetheight+"px";} //下拉菜单js function dropmenu(obj){ $(obj).each(function(){ var thespan = $(this); var themenu = thespan.find(".submenu"); var tarheight = themenu.height(); themenu.css({height:0,opacity:0}); var t1; function expand() { cleartimeout(t1); thespan.find('a').addclass("selected"); themenu.stop().show().animate({height:tarheight,opacity:1},200); } function collapse() { cleartimeout(t1); t1 = settimeout(function(){ thespan.find('a').removeclass("selected"); themenu.stop().animate({height:0,opacity:0},200,function(){ $(this).css({display:"none"}); }); }, 250); } thespan.hover(expand, collapse); themenu.hover(expand, collapse); }); } $(document).ready(function(){ dropmenu(".drop-menu-effect"); }); //搜索框效果 function soclick(obj){ if(obj.value=="请输入搜索信息") obj.value =""; } function soblur(obj){ if(obj.value=="") obj.value ="请输入搜索信息"; } function submitsearch(){ document.searchform.submit(); } //内页左侧栏目效果 $(document).ready(function(){ $(".tht_nav_left ul").hide() $(".tht_nav_left li").each(function(index, element) { if($(this).attr("id") == channelid){ $(this).addclass("nav_act"); } }); var act_id = $(".nav_act").parents("ul").addclass("nav_act_ul"); $(".nav_act").parents("ul").show(); $(".tht_nav_left li").hover( function(){ $(this).children("ul").show(); },function(){ $(this).children("ul").hide(); $(".nav_act_ul").show(); }); if($(".tht_nav_left ul").length==0){ $(this).remove(); } // $("#57").remove();//隐藏2级栏目效果 // $("#ul_57").remove();//隐藏3级栏目效果 }); //详细页字体大小 function changfont(size){ var obj=document.getelementbyid('detailcontent'); obj.style.fontsize=size+'px';}