$(function(){ //wow var wow = new WOW({ boxClass: 'wow', animateClass: 'animated', offset: 100, mobile: true, live: true }); wow.init(); // 鎵嬫満绔鑸爮鐩笅鎷 $('#c-header .c-nav2 li>.c-title-box').click(function() { if ($(this).hasClass("on")) { $(this).removeClass("on").siblings("ul").slideUp(300); } else { $("#c-header .c-nav2 li .c-title-box").removeClass("on").siblings("ul").slideUp(300); $(this).addClass("on").siblings("ul").slideDown(300); } // return false; }); $('#c-header .c-nav2 li .has-childs').click(function() { if ($(this).hasClass("on")) { $(this).removeClass("on").siblings("ol").slideUp(300); } else { $("#c-header .c-nav2 li .has-childs").removeClass("on").siblings("ol").slideUp(300); $(this).addClass("on").siblings("ol").slideDown(300); } // return false; }); // 鎵嬫満绔鑸樉绀 var b = true; $('#c-header .c-switch').click(function() { if (b) { b = false; t = $(window).scrollTop(); $("body").addClass('c-open'); $("body").css("top", -t); } else { b = true; $("body").removeClass('c-open'); $("body").css("top", "0"); $(window).scrollTop(t); } }); // header $(window).scroll(function(){ var win_scroll=$(window).scrollTop(); if(win_scroll>5&&$(window).width() > 1000){ $('.Header-wrapper').addClass('on'); // $('.ban_t').css("margin-top", "76px"); }else{ $('.Header-wrapper').removeClass('on'); // $('.ban_t').css("margin-top", "100px"); } }) // 澶氳瑷€涓嬫媺 $(".language").click(function() { if ($(this).find('.language_down').css("display") == "none") { $(this).find('.language_down').slideDown(300); $(this).addClass('on'); } else { $(this).find('.language_down').slideUp(300); $(this).removeClass('on'); } }); // 鎼滅储寮瑰嚭 $('.Header-container .tool .search i').click(function() { $(".tc_search").addClass("act"); }); $('.search_bg').click(function() { $(".tc_search").removeClass("act"); }); $(window).scroll(function() { if ($(this).scrollTop() > 100) { $(".right-fixed").show(); } else { $(".right-fixed").hide(); }; }); // goTop $('#goTop').click(function() { $('html,body').animate({ scrollTop: '0px' }, 800); }); // 棣栭〉琛屼笟搴旂敤 var mySwiper = new Swiper('.ind_app .swiper', { speed: 600, autoplay:true, navigation: { nextEl: '.ind_app .swiper-button-next', prevEl: '.ind_app .swiper-button-prev', }, breakpoints: { 320: { slidesPerView: 1, spaceBetween: 0 }, 640: { slidesPerView: 2, spaceBetween: 10 }, 1000: { slidesPerView: 4, slidesPerGroup: 4, spaceBetween: 0 }, } }); // 棣栭〉浜у搧涓績 // var mySwiper = new Swiper('.ind_pro .swiper', { // loop: true, // speed: 600, // autoplay:true, // navigation: { // nextEl: '.ind_pro .swiper-button-next', // prevEl: '.ind_pro .swiper-button-prev', // }, // breakpoints: { // 320: { // slidesPerView: 1, // spaceBetween: 0 // }, // 640: { // slidesPerView: 2, // spaceBetween: 10 // }, // 1000: { // slidesPerView: 5, // slidesPerGroup: 5, // spaceBetween: 20 // }, // } // }); // 棣栭〉鏂伴椈 var mySwiper = new Swiper('.ind_news .swiper', { loop: true, speed: 600, autoplay:true, pagination: { el: '.ind_news .swiper-pagination', }, breakpoints: { 320: { slidesPerView: 1, spaceBetween: 0 }, 640: { slidesPerView: 2, spaceBetween: 10 }, 1000: { slidesPerView: 4, spaceBetween: 20 }, } }); // 涓嬭浇涓績鍒囨崲 $('.n_downlist_01 .dowm_nav ul li').click(function() { indexC = $(this).index(); $(this).addClass('active').siblings().removeClass('active'); $('.n_downlist_01 .down_con .item').eq(indexC).addClass('show').siblings().removeClass('show'); }); // 涓嬭浇涓績杞挱 var mySwiper = new Swiper('.n_downlist_01 .item .swiper', { speed: 600, observer:true, observeParents:true, pagination: { el: '.n_downlist_01 .swiper-pagination', }, breakpoints: { 320: { slidesPerView: 1, spaceBetween: 0 }, 640: { slidesPerView: 2, spaceBetween: 10 }, 1000: { slidesPerView: 4, grid: { fill: 'row', rows: 2, }, spaceBetween: 20 }, } }); // 甯歌闂灞曞紑 $(".n_faq ul li .tit").click(function(){ $(this).parents("li").toggleClass("on"); $(this).parents("li").siblings().removeClass("on"); $(this).parents("li").find(".des").slideToggle(); $(this).parents("li").siblings().find(".des").slideUp(); }); // 浜у搧鍒嗙被鍒楄〃椤礯浜у搧杞挱 var mySwiper = new Swiper('.n_pro_sortlist02 .swiper', { speed: 600, autoplay:true, navigation: { nextEl: '.n_pro_sortlist02 .swiper-button-next', prevEl: '.n_pro_sortlist02 .swiper-button-prev', }, breakpoints: { 320: { slidesPerView: 1, spaceBetween: 0 }, 640: { slidesPerView: 2, spaceBetween: 10 }, 1000: { slidesPerView: 5, spaceBetween: 20 }, } }); // 浜у搧鍒楄〃椤靛乏渚у鑸笅鎷 $(document).on('click', 'li.has-childs > a span', function(){ $(this).parent().parent().toggleClass('active'); $(this).parent().next('ul').slideToggle(300); return false; }); $('.pro_nav_view li.has-childs.active').children('ul').stop().slideDown(300); //褰撳墠涓嬫媺 $('.pro_nav_view li.active').parent('ul').stop().slideDown(300); //鐖剁骇涓嬫媺 $('.pro_nav_view li.active').parent().parent().parent('ul').stop().slideDown(300); //鐖剁骇鐨勭埗绾т笅鎷 $('.pro_nav_view li.active').parent().parent('li.has-childs').addClass('active');//浜岀骇涓嬫媺 $('.pro_nav_view li.active').parent().parent().parent().parent('li.has-childs').addClass('active');//涓€绾т笅鎷 // 浜у搧璇︽儏灏忓浘杞挱 var swiper_ico1 = new Swiper(".product_det_ico .mySwiper_ico", { watchSlidesVisibility: true, watchSlidesProgress: true, breakpoints: { 320: { slidesPerView: 3, spaceBetween: 10 }, 640: { slidesPerView: 4, spaceBetween: 20 }, 1000: { slidesPerView: 5, spaceBetween: 10 }, } }); // 浜у搧璇︽儏澶у浘杞挱 var swiper_pic1 = new Swiper(".product_det_pic.mySwiper_pic", { slidesPerView: 1, spaceBetween: 0, effect: 'fade', thumbs: { swiper: swiper_ico1, }, }); // 浜у搧璇︽儏鍒囨崲 $('.n_pro_det .bot .bot_tit a').click(function() { indexC = $(this).index(); $(this).addClass('active').siblings().removeClass('active'); $('.n_pro_det .bot .bot_con .des').eq(indexC).addClass('show').siblings().removeClass('show'); }); // 鏂囧寲-娲诲姩杞挱 var mySwiper = new Swiper('.n_culture_03 .swiper', { speed: 600, observer:true, observeParents:true, pagination: { el: '.n_culture_03 .swiper-pagination', clickable: true, renderBullet: function (index, className) { return '' + ((index + 1)) + ''; }, }, breakpoints: { 320: { slidesPerView: 1, grid: { fill: 'row', rows: 2, }, spaceBetween: 0 }, 640: { slidesPerView: 2, grid: { fill: 'row', rows: 2, }, spaceBetween: 10 }, 1000: { slidesPerView: 4, grid: { fill: 'row', rows: 2, }, spaceBetween: 10 }, } }); // 浼佷笟鑽h獕杞挱 var mySwiper = new Swiper('.n_honor .swiper', { speed: 600, observer:true, observeParents:true, pagination: { el: '.n_honor .swiper-pagination', clickable: true, renderBullet: function (index, className) { return '' + ((index + 1)) + ''; }, }, breakpoints: { 320: { slidesPerView: 2, grid: { fill: 'row', rows: 2, }, spaceBetween: 10 }, 768: { slidesPerView: 3, grid: { fill: 'row', rows: 2, }, spaceBetween: 10 }, 1000: { slidesPerView: 5, grid: { fill: 'row', rows: 2, }, spaceBetween: 10 }, } }); // 鍏氬缓寮曢杞挱 var mySwiper = new Swiper('.n_party_03 .swiper', { speed: 600, observer:true, observeParents:true, pagination: { el: '.n_party_03 .swiper-pagination', clickable: true, renderBullet: function (index, className) { return '' + ((index + 1)) + ''; }, }, breakpoints: { 320: { slidesPerView: 1, grid: { fill: 'row', rows: 2, }, spaceBetween: 0 }, 640: { slidesPerView: 2, grid: { fill: 'row', rows: 2, }, spaceBetween: 10 }, 1000: { slidesPerView: 5, grid: { fill: 'row', rows: 2, }, spaceBetween: 20 }, } }); // 琛屼笟璇︽儏鐩稿叧浜у搧杞挱 var mySwiper = new Swiper('.xgcp .swiper', { // loop: true, speed: 600, autoplay:true, pagination: { el: '.xgcp .swiper-pagination', }, breakpoints: { 320: { slidesPerView: 1, spaceBetween: 0 }, 640: { slidesPerView: 2, spaceBetween: 10 }, 1000: { slidesPerView: 4, spaceBetween: 20 }, } }); // 搴曢儴瀵艰埅鏍忕洰涓嬫媺 $('.Footer-container .top .fr>ul>li p').click(function() { if ($(this).hasClass("on")) { $(this).removeClass("on").siblings(".foot_nav_link").slideUp(300); } else { $(".Footer-container .top .fr>ul>li p").removeClass("on").siblings(".foot_nav_link").slideUp(300); $(this).addClass("on").siblings(".foot_nav_link").slideDown(300); } // return false; }); // 鍏充簬鎴戜滑鍒嗙被瀵艰埅鎵嬫満涓嬫媺 $(".ab_nav_tab .cur-menu").on('click', function () { if (!$(this).hasClass('on')) { $(this).addClass('on'); $(this).next().slideDown(); } else { $(this).removeClass('on'); $(this).next().slideUp(); } }) // 鍏充簬閿氱偣璺宠浆 $(function () { let li = $('.ab_nav_tab').find('li'); li.each(function (i) { $(this).click(function () { li.removeClass('active'); $(this).addClass('active'); $('body,html').stop(true, true).animate({ scrollTop: $('.page').eq(i).offset().top - $('.ab_nav_tab').height() }, 500); return false }) }); }) // 浜у搧鍒楄〃璺宠浆 $(function () { $('.n_pro_sortlist01 .fr a.pdf').click(function () { $('body,html').stop(true, true).animate({ scrollTop: $('#pdf').offset().top - $('.btn').height() }, 500); return false }) $('.n_pro_sortlist01 .fr a.contact').click(function () { $('body,html').stop(true, true).animate({ scrollTop: $('#contact').offset().top - $('.btn').height() }, 500); return false }) }) widthChange(); function widthChange(){ if($(window).width()>1000){$("body").addClass("winter");}else{ $("body").removeClass("winter");} var window_width = $(window).width();//鑾峰彇娴忚鍣ㄧ獥鍙e搴 // 瓒呭嚭璁惧鎻愮ず if (!!window.ActiveXObject || "ActiveXObject" in window){return false;} var rberMe = sessionStorage['rberMe'] || ''; if( window_width >= 2000 && rberMe==''){ sessionStorage['rberMe'] = 'www.yisiy.com'; var wthint = "鎮ㄧ殑鏄剧ず璁惧宸茶秴鍑鸿璁¤寖鍥达紒涓轰簡甯冨眬缇庤锛岄噰鍙栧眳涓帓鐗堬紒纭畾鍚楋紵"; if (window.confirm(wthint)) {sessionStorage['rberMe'] = 'winter';$("body").addClass("body-maxwidth");} else{return;} } if(rberMe=='winter') {$("body").addClass("body-maxwidth");} } // 鍒ゆ柇鏄惁涓篒E娴忚鍣 // if (!!window.ActiveXObject || "ActiveXObject" in window){alert("褰撳墠涓篒E娴忚鍣紝閮ㄥ垎鏁堟灉鍜屾牱寮忎笉鍏煎锛佽鏇存崲娴忚鍣紝娆h祻鏇翠匠锛?);} // 骞虫澘hover澶辨晥 // document.body.addEventListener('touchstart',function(){}); // 绂佹鍥剧墖銆乤鏍囩鍙互鎷栧姩 // $("body").find("img,a").attr("ondragstart","return false"); //娴忚鍣ㄧ獥鍙d簨浠 $(window).resize(function () {widthChange();}); // 椤甸潰婊氬姩杞翠簨浠 $(window).scroll(function () {}); });