// javascript document $(function () { $navmobile = jquery("#navmobile"), $nava = $navmobile.find("a"), $msubnav = $navmobile.find(".msubnav"); var menu = { trigger: ".menubtn", trigger2: ".menuclose", init: function () { menu.bind(); }, bind: function () { $(document).on("click", menu.trigger, menu.opennav); $(document).on("click", menu.trigger2, menu.opennav); }, opennav: function () { if ($("body").is(".open")) { $("body").removeclass("open"); $(".menu-handler").removeclass("active"); } else { $("body").addclass("open"); $(".menu-handler").addclass("active"); } } }; jquery(function () { menu.init(); jquery("#navmobile>dd>p>a").bind("click", function (e) { var hjcur = $(this); var hjdd = $(this).parents("p").parents("dd"); if (hjdd.find(".msubnav").size() > 0) { if (hjcur.hasclass("cur")) { hjdd.find(".msubnav").stop(false, false).slideup(); hjcur.removeclass("cur"); } else { $nava.removeclass("cur"); $msubnav.stop(false, false).slideup(); hjdd.find(".msubnav").stop(false, false).slidedown(); hjcur.addclass("cur"); e.preventdefault(); } } }); }); jquery("#navmobile .msubnav a").click(function (e) { var hash = jquery(this).attr("href").split("#")[1]; if (hash && jquery("#" + hash).length == 1) { e.preventdefault(); setscroll("#" + hash); $("body").removeclass("open"); $(".menu-handler").removeclass("active"); } }); }); $(function () { //nav $(".jtnav li").hover(function(){ $(this).addclass("onnav"); $(this).find(".sub").stop(true,true).slidedown(300); }, function(){ $(this).removeclass("onnav"); $(this).find(".sub").stop(true,true).slideup(300); }); //banner var swiper = new swiper('.jtbanner-pic', { effect: 'fade', speed:900, autoplay: { delay:3500, disableoninteraction: false, }, }); //新闻中心 var swiper = new swiper('.jtnews-pic', { autoplay: { delay:4000, disableoninteraction: false, }, pagination: { el: '.swiper-pagination', clickable: true, }, }); var swiper = new swiper('.jtwork-pic', { effect: 'fade', speed:900, autoplay: { delay:4000, disableoninteraction: false, }, pagination: { el: '.swiper-pagination', clickable: true, }, }); //工程业绩 var swiper = new swiper('.jtproject-list', { navigation: { nextel: '.swiper-button-next', prevel: '.swiper-button-prev', }, }); var swiper = new swiper('.mobile-project', { navigation: { nextel: '.swiper-button-next', prevel: '.swiper-button-prev', }, }); //资质荣誉 var swiper = new swiper('.phonor-pic', { slidesperview:3, spacebetween: 66, navigation: { nextel: '.swiper-button-next', prevel: '.swiper-button-prev', }, breakpoints: { 1440: { slidesperview:3, spacebetween: 40, }, 1024: { slidesperview: 3, spacebetween: 20, }, 768: { slidesperview: 2, spacebetween: 20, }, 480: { slidesperview: 1, spacebetween: 0, } } }); //tab 切换 /*$(".jtfinan-title li").hover(function () { var index = $(this).parent().children().index(this); $(this).parent().children().each(function () { if ($(this).hasclass("active")) { $(this).removeclass("active"); } }); $(this).addclass("active"); $(".jtfinan-cont .f-box").each(function () { if (!$(this).hasclass("hide")) { $(this).addclass("hide"); } }); $(".jtfinan-cont .f-box").eq(index).removeclass("hide"); });*/ $(".jtfinan-title li").each(function(index){ $(this).mouseover(function(){ $(".jtfinan-cont .f-box").each(function(){ $(this).hide(); }); $(this).addclass("jl_indexbigpicthreeper_hover"); $($(".jtfinan-cont .f-box")[index]).show(); }).mouseout(function(){ $(".jtfinan-cont .f-box").each(function(){ $(this).hide(); }); $(this).removeclass("jl_indexbigpicthreeper_hover"); }); }); $(".jtfinan-cont .f-box").each(function(index){ $(this).mouseover(function(){ $(this).show(); $($(".jtfinan-title li")[index]).addclass("jl_indexbigpicthreeper_hover"); }).mouseout(function(){ $(this).hide(); $($(".jtfinan-title li")[index]).removeclass("jl_indexbigpicthreeper_hover"); }); }); $(".jtwork-news-tab li").click(function () { var index = $(this).parent().children().index(this); $(this).parent().children().each(function () { if ($(this).hasclass("on")) { $(this).removeclass("on"); } }); $(this).addclass("on"); $(".jtwork-news-list ul").each(function () { if (!$(this).hasclass("hide")) { $(this).addclass("hide"); } }); $(".jtwork-news-list ul").eq(index).removeclass("hide"); }); //人力资源 $(".pjob-list").on('click', '.jt', function() { if ($(this).hasclass('jt-act')) { $(this).removeclass('jt-act').siblings(".jt-act").removeclass("jt-act").end(). next(".jc").slideup('128').siblings(".jc:visible").slideup('128'); } else { $(this).addclass("jt-act").siblings(".jt-act").removeclass("jt-act").end(). next(".jc").slidedown('128').siblings(".jc:visible").slideup('128'); } }) //调查问卷 $(".pquest-survey").on('click', '.dt', function() { if ($(this).hasclass('act')) { $(this).removeclass('act').siblings(".act").removeclass("act").end(). next(".dd").slideup('128').siblings(".dd:visible").slideup('128'); } else { $(this).addclass("act").siblings(".act").removeclass("act").end(). next(".dd").slidedown('128').siblings(".dd:visible").slideup('128'); } }) //友情链接 $('.jtfooter-links .sh-tit').on('click',function (e){ e.stoppropagation(); $(this).parents('.jtfooter-links').toggleclass('on'); $('.jtfooter-links .sh-cot').slidetoggle(); }); //工程业绩 $('.li-pro').hover(function(){ $(this).addclass('show').siblings().addclass('hiden'); },function(){ $(this).removeclass('show').siblings().removeclass('hiden'); }); });