function sel0(){ $(".select_0").each(function(i){ $(this).find("dt").unbind("click") $(this).find("dt").click(function(e){ $(this).css("z-index","99").siblings().css("z-index","1"); $(this).parent().css("z-index","99").siblings().css("z-index","1"); $(this).parent().parent().css("z-index","99").siblings().css("z-index","1"); $(this).parent().parent().parent().css("z-index","99").siblings().css("z-index","1"); e.preventdefault(); e.stoppropagation() $(".select_0").find("dd").hide(); $(".select_0").eq(i).find("dd").show(); $(".select_0").eq(i).find("dd a").each(function(x){ $(this).unbind("click") $(this).click(function(){ $(".select_0").eq(i).find("dd a").removeclass("on") $(this).addclass("on") $(".select_0").eq(i).find("dt").text($(this).text()) $(".select_0").eq(i).next(".select_hidden").val($(this).attr("data-val")) }) }) }) }) } $(function(){ $(".careers_con table tr:even").attr("bgcolor","#e1dad1") //模拟下拉 $(document).click(function(){ $(".select_0 dd").hide(); }) //模拟下拉end sel0() $(".product_ind li.product_tit").mouseover(function(){ $(".product_ind li.product_cont").hide(); $(".product_ind li.product_tit img").hide(); $(this).next(".product_ind li.product_cont").show(); $(this).children("img").show() }) $(".nav li").hover(function(){ $(this).children(".drop").stop(true,false).slidedown() },function(){ $(this).children(".drop").stop(true,false).slideup() }) //字号切换 $('.contents_size i').click(function () { var index = $(this).index(); $(this).addclass('on').siblings().removeclass('on'); if (index == 0) { $('.news_article').css('font-size', '16px'); } else if (index == 1) { $('.news_article').css('font-size', '14px'); } else { $('.news_article').css('font-size', '12px'); } }) var $div_li =$(".event_tab li"); $div_li.click(function(){ $(this).addclass("on") .siblings().removeclass("on"); var index = $div_li.index(this); $(".event_ind ") .eq(index).show() .siblings().hide(); }) $(".scroll_l").click(function(){ scroll_l($(".scroll ")) }) $(".scroll_r").click(function(){ scroll_r($(".scroll ")) }) $(".scroll li").live('click',function(){ var num=$(this).attr("num"); $(".big_txt li").eq(num).fadein().siblings().fadeout() $(this).addclass("on").siblings().removeclass("on") }) $(".fanli1").hover(function(){ $(".fanlibox1").show() },function(){ $(".fanlibox1").hide() }) $(".fanli2").hover(function(){ $(".fanlibox2").show() },function(){ $(".fanlibox2").hide() }) }) function scroll_l(obj){ var $self = obj.find("ul:first"); if(!$self.is(":animated")){ var linewidth = $self.find("li:first").outerwidth(true); $self.css({marginleft:-linewidth}); $self.find("li:first").before($self.find("li:last")) $self.animate({ "marginleft" : 0+"px" }, 600) } } function scroll_r(obj){ var $self = obj.find("ul:first"); if(!$self.is(":animated")){ var linewidth = $self.find("li:first").outerwidth(true); $self.animate({ "marginleft" : -linewidth+"px" }, 600 , function(){ $self.css({marginleft:0}).find("li:first").appendto($self); }) } } /*打印标记*/ function doprint() { bdhtml=window.document.body.innerhtml; sprnstr=""; eprnstr=""; prnhtml=bdhtml.substr(bdhtml.indexof(sprnstr)+17); prnhtml=prnhtml.substring(0,prnhtml.indexof(eprnstr)); openwindow = window.open(""); openwindow.document.write("打印页<\/title><link href=\"/templete\/web004\/css\/print.css\" rel=\"stylesheet\" type=\"text\/css\" \/>><link href=\"/templete\/web004\/css\/common.css\" rel=\"stylesheet\" type=\"text\/css\" \/><\/head><body><div id=\"printbox\" class=\"news_cont\" ><\/div><\/body><\/html>"); openwindow.document.getelementbyid("printbox").innerhtml=prnhtml; openwindow.document.close(); openwindow.print(); } /*打印区的内容一定要加<!--startprint-->和<!--endprint-->标记*/ //<a href="javascript:;" onclick="doprint()">打印</a> $(function(){ $(".close").click(function(){ window.close(); return true; }) })