/*鏂扮殑*/ $(function () { // 鎼滅储楠岃瘉 $("#btt").click(function () { ksbm.common.tools.validate($("#formm")); }) var flag2 = true; $(".phone-menu-caidan").click(function () { if (flag2) { $(this).addClass("active"); $(".phone-menu .phone-menu-ul").addClass("active"); flag2 = false; } else { $(this).removeClass("active"); $(".phone-menu .phone-menu-ul").removeClass("active"); flag2 = true; } }); $(".phone-menu .phone-menu-ul > li:nth-child(3) a,.phone-menu .phone-menu-ul > li:nth-child(5) a,.phone-menu .phone-menu-ul > li:nth-child(6) a").click(function () { $(".phone-menu-caidan").removeClass("active"); $(".phone-menu-ul").removeClass("active"); }) $(".phone-menu .phone-menu-ul>li ul li a").click(function () { $(".phone-menu-ul").removeClass("active"); $(".phone-menu .phone-menu-caidan").removeClass("active"); }) var flag3 = true; $(".head-sousuo-i").click(function (e) { e.stopPropagation(); if (flag3) { $(".searchbox").slideDown(); $(this).addClass("icon-cuowuguanbiquxiao"); $(this).removeClass("icon-sousuo_o"); flag3 = false; } else { $(".searchbox").slideUp(); $(this).removeClass("icon-cuowuguanbiquxiao"); $(this).addClass("icon-sousuo_o"); flag3 = true; } }); SecondDown(); function SecondDown() { $("header .menu-ul > li").hover(function (e) { $(this).find(".head-menu").stop(true).slideDown(); $(this).siblings("li").find(".head-menu").stop(true).slideUp(); }); $(".menu-ul").hover(function () { }, function () { $(".head-menu").slideUp(); }); }; $(window).resize(function () { SecondDown(); }); $(".cp-index .cp-index-bottom .cp-index-bottom-l ul li").click(function () { $(this).addClass("active").siblings("li").removeClass("active"); var index = $(this).index(); $(".cp-index-bottom-r-list").eq(index).addClass("active").siblings(".cp-index-bottom-r-list").removeClass("active"); }); $(".top").click(function () { $('html,body').animate({ 'scrollTop': 0 }, 500); }); $(".phone-menu .phone-menu-ul > li span").click((function () { var mSubmenuBox = $(this).siblings('.phone-menu-sec'); var mSubmenuSiblingsBox = $(this).parents('li').siblings('li').find('.phone-menu-sec'); var mSubmenuSiblingsJt = $(this).parents('li').siblings('li').children('span'); if (!mSubmenuBox.is(":visible")) { $(this).addClass('active').parents("li").siblings("li").children("span").removeClass("active"); mSubmenuBox.slideDown(); mSubmenuSiblingsJt.removeClass('clicked'); mSubmenuSiblingsBox.slideUp(); } else { $(this).removeClass('active'); mSubmenuBox.slideUp(); } // $(this).parents("li").find(".phone-menu-sec").slideDown(); // $(this).parents("li").siblings("li").find(".phone-menu-sec").slideUp(); // $(this).addClass("active"); // $(this).parents("li").siblings("li").find("span").removeClass("active"); })); BannerAutoSize(); function BannerAutoSize() { var $W = $(window).width(); var WH = $(window).height(); console.log(WH); if ($W > 1440) { var WH = $(window).height() - 91; var WH01 = $(window).height() - 91 - 54; $(".news-banner").css("height", WH); $(".banner-in").css("height", WH01); $(".banner").css("height", WH01); $(".banner-in-tzz").css("height", WH); } else { $(".banner").css("height", "auto"); $(".news-banner").css("height", "auto"); $(".banner-in").css("height", "auto"); $(".banner-in-tzz").css("height", "auto"); } } $(window).resize(function () { BannerAutoSize(); }); $(".load .home-a").hover(function () { $(this).addClass("active"); $(this).find(".home-a-in").stop(true).slideDown(); }); $(".load .home-a").hover(function () { }, function () { $(".home-a-in").slideUp(); }); var $window = $(window); $window.scroll(function () { var scrollTop = $(document).scrollTop(); if (scrollTop > 91) { $(".index-header header").addClass("active"); // $(".load").addClass("active"); $(".load-cpjs").addClass("active"); } else { $(".index-header header").removeClass("active"); // $(".load").removeClass("active"); $(".load-cpjs").removeClass("active"); } }); $(document).on("click", "footer .phone_footer .foot-top-ul li h3 div", subMenu); function subMenu(e) { $thisp = $(this).parents("li"); var chk = false; $("footer .phone_footer .foot-top-ul li").removeClass("active"); var dropDown = $(this).parents("li").find(".foot-top-ul-in"); $(".foot-top-ul-in").not(dropDown).slideUp("fast"); dropDown.stop(false, true).slideToggle("fast", function () { if ($(this).is(":hidden")) { $thisp.removeClass("active"); chk = false; } else { $thisp.addClass("active"); chk = true; } }); } $(".load-cpjs li").click(function () { $(this).addClass("active").siblings("li").removeClass("active"); }); $(".load .load-ul li").click(function () { $(this).addClass("active").siblings("li").removeClass("active"); }); $(".cpjs-section04-t20").each(function () { var len = $(this).find("img").length; if (len == 0) { $(this).hide(); } }); $(".load .home-a > a:nth-child(3)").attr("href", "javascript:;"); var str10 = window.location.href.split("/")[3]; // ErjiDown(); // function ErjiDown() { // $("header .menu-ul >li").each(function () { // var str01 = $(this).find("a").attr("href").split("/")[1]; // if (str10 == str01) { // console.log(str01 + "#########"); // $(this).find(".sec-ul").remove(); // console.log("!!!!!!!!!!!"); // } // }); // } // $(window).resize(function () { // ErjiDown(); // }); var flag4 = true; $(".foot-more").click(function () { if (flag4) { $(".foot-more-in").show(); $(this).text("鐐瑰嚮鏀惰捣 -"); flag4 = false; } else { $(".foot-more-in").hide(); $(this).text("鏌ョ湅鏇村 +"); flag4 = true; } }); var heightss = $(".heig_load").height() + 91 - 2; var heightss2 = $(".heig_load").height() + 45 - 2; $('.navItems').click(function (e) { var navto = $(this).attr('navto'); e.preventDefault(); if (navto != "#") { var $div = $('#' + navto); var top = $div.offset().top || 0; if ($window.width() >= 1200) { console.log(1); $('html,body').animate({ 'scroll-top': top - heightss }, 500); } else { console.log(2); $('html,body').animate({ 'scroll-top': top - heightss2 }, 500); } } else { $('html,body').animate({ 'scroll-top': 0 }, 500); } }); $(".load-ul li").each(function () { var ttex = $.trim($(this).find("a").text()); if (ttex == "") { $(this).remove() } }); $(window).scroll(function () { var scrollTop = $(document).scrollTop(); $('.content_box>div').each(function (index) { let tops = $('.content_box>div:eq(' + index + ')').offset().top - 500; if (scrollTop >= tops) { $('.load-ul >li:eq(' + index + ')').addClass('active').siblings().removeClass('active'); } }) }); var teidian_L1 = $(".tedian>div").eq(0).find(".cpjs-section01-t20-div p").length; var teidian_L2 = $(".tedian>div").eq(1).find(".cpjs-section01-t20-div p").length; var teidian_L3 = $(".tedian>div").eq(2).find(".cpjs-section01-t20-div p").length; if (teidian_L1 == teidian_L2 == teidian_L3) { $(".tedian >div .cpjs-section01-t20-div p").addClass("active"); } // 浜屾湡鍐呭 $(".active_sx ul li").click(function () { $(this).addClass("active").siblings().removeClass("active"); var index = $(this).index(); $(".active_sum >div").eq(index).addClass("active").siblings().removeClass("active"); }); $(".active_sum >div").eq(0).addClass("active"); $(".active_sx ul li").eq(0).addClass("active"); $('.show_active_two .content').click(function () { $('#spsy_tc .hall-wheel video')[0].play(); }); $('#spsy_tc .close,#spsy_tc').click(function () { $('#spsy_tc .hall-wheel video')[0].pause(); }); var swiper = new Swiper(".show_active_three .swiper-container", { slidesPerView: 4, spaceBetween: 30, observer: true, //淇敼swiper鑷繁鎴栧瓙鍏冪礌鏃讹紝鑷姩鍒濆鍖杝wiper observeParents: true, pagination: { el: ".show_active_three .swiper-pagination", clickable: true, }, breakpoints: { 1280: { slidesPerView: 3, }, 767: { slidesPerView: 2, }, 500: { slidesPerView: 1, }, } }); var swiper = new Swiper(".industry3 .swiper-container", { slidesPerView: 5, slidesPerColumn: 4, spaceBetween: 30, slidesPerColumnFill: 'row', pagination: { el: ".industry3 .swiper-pagination", clickable: true, }, observer: true, observeParents: true, breakpoints: { 990: { slidesPerView: 4, spaceBetween: 22, pagination: { el: ".industry3 .swiper-pagination", clickable: true, }, }, 767: { slidesPerView: 3, spaceBetween: 10, slidesPerColumn: 3, pagination: { el: ".industry3 .swiper-pagination", clickable: true, }, } } }); var index_hyyy_swiper = new Swiper(".index_hyyy .swiper-container", { speed: 1000, effect: "fade", on: { slideChangeTransitionStart: function () { $(".index_hyyy ul li").eq(this.activeIndex).addClass("active").siblings("li").removeClass("active"); }, } }); $(".index_hyyy ul li").on('mouseenter', function (e) { index_hyyy_swiper.slideTo($(this).index()); }); $(".index_hyyy ul li").eq(0).addClass("active") var swiper = new Swiper(".about_swiper .swiper-container", { slidesPerView: 5, spaceBetween: 2, navigation: { nextEl: ".about_swiper .swiper-button-next", prevEl: ".about_swiper .swiper-button-prev", }, pagination: { el: ".about_swiper .swiper-pagination", clickable: true, }, observer: true, observeParents: true, breakpoints: { 1280: { slidesPerView: 4, }, 992: { slidesPerView: 3, }, 650: { slidesPerView: 2, } } }); var swiper_hyyy_swiper_sw = new Swiper(".hyyy_swiper_sw .swiper-container", { slidesPerView: 3, slidesPerColumn: 2, slidesPerColumnFill: 'row', spaceBetween: 70, observer: true, observeParents: true, noSwiping: true, pagination: { el: ".hyyy_swiper_sw .swiper-pagination", clickable: true, }, breakpoints: { 1600: { spaceBetween: 40, }, 990: { spaceBetween: 15, }, 767: { spaceBetween: 15, slidesPerView: 2, noSwiping: false, } } }); window.onresize = function () { swiper_hyyy_swiper_sw.updateSize(); } }) $(function () { var wow = new WOW({ boxClass: 'wow', animateClass: 'animated', offset: 0, mobile: true, live: true }); wow.init(); $('.counter').countUp(); })