// 椤靛ご鎼滅储妗嗙偣鍑讳簨浠 $(".header_search_box .shanchu").click(function(){ $(".header_search_box input").val(""); }) let shou = true; $(".header_search .search").click(function(){ if(shou){ $(".header_search .search img").attr("src","/template/default/images/index/tou/sousuo.png"); $(".header_search .search img").css("width","25%"); $(".header_search .search").addClass("search_cha"); $(".header_search_box").stop().slideDown(300,function(){ $(".header_search_box").css("display","block"); }) shou = false; }else{ $(".header_search .search").removeClass("search_cha"); $(".header_search .search img").attr("src","/template/default/images/index/tou/search2.png"); $(".header_search .search img").css("width","100%"); $(".header_search_box").stop().slideUp(300,function(){ $(".header_search_box").css("display","none"); $(".header_search_box input").val(""); }) shou = true; } }) // 椤靛ご杞挱鍥 let swiper1 = new Swiper('#swiper1',{ // grabCursor : true,// 瑙︽懜鍙樻垚鎵嬫帉 // autoplay: 2000, speed:1000, // 閫熷害 loop : true, // 璁㏒wiper鐪嬭捣鏉ユ槸寰幆鐨 pagination : '.swiper-pagination', paginationClickable :true, noSwipingClass : 'stop-swiping', }); //榧犳爣瑕嗙洊鍋滄鑷姩鍒囨崲 $("#swiper1").mouseenter(function(){ swiper1.stopAutoplay(); }); //榧犳爣绂诲紑寮€濮嬭嚜鍔ㄥ垏鎹 $("#swiper1").mouseleave(function(){ swiper1.startAutoplay(); }); // 椤靛ご闈㈠寘灞戜笅婊 let bol = true; $(".header_menu").click(function(){ if(bol){ $(".header_nav").stop().slideDown(300,function(){ $(".header_nav").css("display","block"); }); bol = false; }else{ $(".header_nav").stop().slideUp(300,function(){ $(".header_nav").css("display","none"); }); bol = true; } }); // 椤靛ご浜屾鑿滃崟 $(".header_nav>li").mouseenter(function(){ $($(this)[0].children[1]).stop().slideDown(300); }); $(".header_nav>li").mouseleave(function(){ $($(this)[0].children[1]).stop().slideUp(300); }); // 鏃堕棿杞 var p = $('.abolc-dot').width(), n = -50; $(".abolc-ldot .abolc-dotline").css("left",p + "px"); $(".abolc-rdot .abolc-dotline").css("left",n + "px"); var timerShaft = new Swiper('.abolc-time .swiper-container', { speed: 400, slidesPerView: 1, slidesPerGroup : 1, spaceBetween : 0, centeredSlides: true, slideToClickedSlide:true, prevButton: '.abolc-prev', nextButton: '.abolc-next', onSlideChangeStart: function(swiper){ comTeamMove(swiper.activeIndex,timerShaft,timerWords); } }); $(".abolc-ldot .abolc-dotck").bind("click",function(){timerShaft.slideTo($(this).index())}); $(".abolc-rdot .abolc-dotck").bind("click",function(){timerShaft.slideTo($(this).index())}); function comTeamMove(index,timerShaft,timerWords){ $(".abolc-ldot .abolc-dotline").stop().animate({left: (3 - index) * 50}, 300); $(".abolc-rdot .abolc-dotline").stop().animate({left: (-1 - index) * 50}, 300); if($(window).width()<1000){ $(".abolc-ldot .abolc-dotline").stop().animate({left: (2 - index) * 50}, 300); $(".abolc-rdot .abolc-dotline").stop().animate({left: (-1 - index) * 50}, 300); } if($(window).width()<640){ $(".abolc-ldot .abolc-dotline").stop().animate({left: (1 - index) * 50}, 300); $(".abolc-rdot .abolc-dotline").stop().animate({left: (-1 - index) * 50}, 300); } timerWords.slideTo(index);timerShaft.slideTo(index); } var timerWords = new Swiper('.abolc-wdbox .swiper-container', {speed: 0}); // over // 缃《 $(".sideBar-wrapper .backTop").click(function () { $("html,body").animate({ scrollTop: "0px" }, 800) }); $(".yqlj").mouseenter(function(){ $(".yqlj-box").show(); }) $(".yqlj").mouseleave(function(){ $(".yqlj-box").hide(); }) // 椤甸潰body 娣诲姞绫诲悕 鐩戝惉浜嬩欢 bodyChange(); function bodyChange(){ if ($(window).width() <= 1000) {$("body").removeClass("winter");}else{$("body").addClass("winter");} } widthChange(); function widthChange(){ 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祻鏇翠匠锛?);} //娴忚鍣ㄧ獥鍙d簨浠 $(window).resize(function () {widthChange();bodyChange();});