$(function () { $("a").focus(function () { this.blur(); }); $(".mainnav li").each(function (i, n) { if ($(this).find(".navpull dd").length == 0) { $(this).find(".arr").hide(); $(this).find(".navpull").addclass("null"); } }); // $(".openbtn").click(function () { $(this).toggleclass("on"); $(".mobilenav").slidetoggle(); $(".mstbg").slidetoggle(); $("body").toggleclass("bodyon"); $(".closebtn").slidetoggle(1000); }); // $(".closebtn").click(function () { $(".openbtn").toggleclass("on"); $(".mobilenav").slidetoggle(); $(".mstbg").slidetoggle(0); $("body").toggleclass("bodyon"); $(".closebtn").slidetoggle(0); }); // $(".searchbox .icon").click(function () { $(".search").show(); }); $(".search .close").click(function () { $(".search").hide(); }); // $(".slidetxt").slide({}); //$(".singlepage img").removeattr("width").removeattr("height"); $(".singlepage img").parent("p span").css("text-indent", "0em"); $(".singlepage img").parent("p").css({ "text-indent": "0em", "text-align": "center" }); // $('.leftcontent .content,.casedesc .content').hide(); tab_fuc($(".rightsider .nav li,.casedesc .nav li"), $(".leftcontent .content,.casedesc .content"), 'on', 'click'); function tab_fuc(list, cont, cls, trig) { list.first().addclass(cls); cont.first().show(); trig = trig ? trig : 'click'; list.on(trig, function () { if (!$(this).hasclass(cls)) { list.removeclass(cls); $(this).addclass(cls); cont.stop(true, true).hide(); cont.eq($(this).index()).stop(true, true).fadein(400); $(window).resize(); } }); }; // //商业运营 s $(".businessbox .slides li .nav dd:first-child").addclass("on"); $(".businessbox .slides li .img1").addclass("on"); //商业运营 end $(".joblist li:first-child").addclass("lion"); $(".joblist li:first-child").find(".con").slidedown(500); $(".joblist li").each(function () { var btn = $(this).find(".box"); btn.click(function () { var statis = $(this).parents("li").find(".con").css("display"); if (statis == "none") { $(this).parents("li").siblings().removeclass("lion"); $(this).parents("li").siblings().find(".con").slideup(500); $(this).parents("li").addclass("lion"); $(this).parents("li").find(".con").slidedown(500); } else { $(this).parents("li").find(".con").slideup(500); $(this).parents("li").removeclass("lion"); } }); }); //人才招聘 var offset = 300, offset_opacity = 1200, scroll_top_duration = 1000, $back_to_top = $('.cd-top'); $(window).scroll(function () { ($(this).scrolltop() > offset) ? $back_to_top.addclass('cd-is-visible') : $back_to_top.removeclass('cd-is-visible'); }); $back_to_top.on('click', function (event) { event.preventdefault(); $('body,html').animate({ scrolltop: 0, }, scroll_top_duration ); });//返回顶部 }); //nav s $(".pcnav li").hover( function () { $(".pcnav .navpull").hide(); $(".pcnav li span .sele").attr("class", "shutahover"); $(this).attr("id", "nav_hover") $("#nav_hover span a").attr("class", "sele"); $("#nav_hover").find(".navpull").stop(true, true).slidedown(); }, function () { if ($(this).attr("class") != "nav_lishw") { $("#nav_hover span .sele").attr("class", ""); $("#nav_hover .navpull").stop(true, true).slideup(); } $(this).attr("id", "") $(".pcnav li span .shutahover").attr("class", "sele"); $(".nav_lishw").find(".navpull").attr(); $(".nav_lishw span a").attr("class", "sele"); } ); $(".mobilenav li").each(function () { var btn = $(this).find(".arr"); btn.click(function () { var statis = $(this).parents("li").find(".navpull").css("display"); if (statis == "none") { $(this).parents("li").siblings().removeclass("onnav"); $(this).parents("li").siblings().find(".navpull").slideup(); $(this).parents("li").addclass("onnav"); $(this).parents("li").find(".navpull").slidedown(); } else { $(this).parents("li").find(".navpull").slideup(); $(this).parents("li").removeclass("onnav"); } }); }); //头部nav end //jquery start $(function () { $('a[href*=#]').click(function () { if (location.pathname.replace(/^//, '') == this.pathname.replace(/^//, '') && location.hostname == this.hostname) { var $target = $(this.hash); $target = $target.length && $target || $('[name=' + this.hash.slice(1) + ']'); if ($target.length) { var targetoffset = $target.offset().top; $('html,body').animate({ scrolltop: targetoffset }, 1000); return false; } } }); }); //jquery end function settab(name,cursel,n){ for(i=1;i<=n;i++){ var menu=document.getelementbyid(name+i); var con=document.getelementbyid("con_"+name+"_"+i); menu.classname=i==cursel?"on":""; con.style.display=i==cursel?"block":"none"; } } //-->