/* $(document).on('click','瑕侀€夋嫨鐨勫厓绱?,function(){} on鏂规硶鍖呭惈寰堝浜嬩欢锛岀偣鍑伙紝鍙屽嚮绛夌瓑浜嬩欢銆傚拰$().click()鐨勭敤娉曚竴鏍凤紝鏈€澶х殑鍖哄埆鍗充紭鐐规槸濡傛灉鍔ㄦ€佸垱寤虹殑鍏冪礌鍦ㄨ閫夋嫨鍣ㄩ€変腑鑼冨洿鍐呮槸鑳借Е鍙戝洖璋冨嚱鏁 */ $(document).on('click', '.ret-top', function () { $('html,body').animate({scrollTop: 0}, 500) }); var navMenu = $('.nav-menu') /*--- 鏄剧ず鎵嬫満瀵艰埅 ---*/ $('.show-btn').click(function () { navMenu.addClass('show') }); /*--- 鍏抽棴鎵嬫満瀵艰埅 ---*/ $('.close-btn').click(function () { navMenu.removeClass('show') }); /*--- 鍏徃涓氬姟鍒囨崲 ---*/ $('.bus-change-btns').find('a').hover(function () { var _this = $(this), idx = _this.index(); _this.addClass('active').siblings().removeClass('active'); $('.bus-pics').find('.b-item').eq(idx).addClass('active').siblings().removeClass('active') $('.bus-txt').find('.bt-item').eq(idx).show().siblings().hide() }); /*--- 棣栭〉-鍏徃鍔ㄦ€佸垏鎹 ---*/ $('.ib-02 .n-list li').hover(function () { var _this = $(this), idx = _this.index(); $('.ib-02 .img-box .item').eq(idx).show().siblings().hide() }); /*--- 鏂囧寲鍒囨崲 ---*/ $('.tips-list li').hover(function () { var _this = $(this), idx = _this.index(); _this.addClass('active').siblings().removeClass('active'); }); /*--- 棣栭〉-鍏徃涓氬姟鍒囨崲 ---*/ $('.ib-01 .tabs a').hover(function () { var _this = $(this), idx = _this.index(); _this.addClass('active').siblings().removeClass('active'); _this.parents('.ib-01').find('.img-box .item').eq(idx).show().siblings().hide(); }); $(function () { /* // --- 椤堕儴banner var swiper_index = new Swiper('.swiper-index', { autoplay: 4000, speed: 800, effect: 'slide', loop: true, autoplayDisableOnInteraction: false, pagination: '.swiper-index .swiper-pagination', paginationClickable: true, onInit: function(swiper){ //Swiper2.x鐨勫垵濮嬪寲鏄痮nFirstInit swiperAnimateCache(swiper); //闅愯棌鍔ㄧ敾鍏冪礌 swiperAnimate(swiper); //鍒濆鍖栧畬鎴愬紑濮嬪姩鐢 }, onSlideChangeEnd: function(swiper){ swiperAnimate(swiper); //姣忎釜slide鍒囨崲缁撴潫鏃朵篃杩愯褰撳墠slide鍔ㄧ敾 } }); var banner_index = $('.swiper-index'); banner_index.mouseenter(function () { swiper_index.stopAutoplay(); }); banner_index.mouseleave(function () { swiper_index.startAutoplay(); }); */ /*----------------- 鍔ㄦ晥 ----------------*/ AOS.init({ easing: 'ease-out-back', duration: 1000 }); // --- 鍙戝睍鍘嗙▼ 鍒囨崲 var timeLinePc = $('.time-line-pc'), timeLineMb = $('.time-line-mb'), timeLineCont = $('.time-line-cont'); timeLinePc.find('ul li').click(function (){ var _this = $(this), idx = _this.index(); _this.addClass('active').siblings().removeClass('active'); var moveDis = -(54+30) * (idx + 1) + 46 + 'px'; timeLinePc.find('ul').css({marginLeft: moveDis}); timeLineMb.find('ul li').eq(idx).addClass('active').siblings().removeClass('active'); timeLineCont.find('ul li').eq(idx).show().siblings().hide(); }); timeLineMb.find('ul li').click(function (){ var _this = $(this), idx = _this.index(); _this.addClass('active').siblings().removeClass('active'); var moveDis = -(54+30) * (idx + 1) + 46 + 'px'; timeLinePc.find('ul').css({marginLeft: moveDis}); timeLinePc.find('ul li').eq(idx).addClass('active').siblings().removeClass('active'); timeLineCont.find('ul li').eq(idx).show().siblings().hide(); }); /* 閿氱偣瀵艰埅 婊氬姩鏉″垽鏂 */ $(function () { //2.鑾峰彇姣忓眰妤肩殑offset().top,鐐瑰嚮閿氱偣璁╁搴旂殑鍐呭妯″潡绉诲姩鍒板搴旂殑浣嶇疆 offset().left var $loutiNav=$('.nav-child ul li'); $loutiNav.on('click',function(){ var idx =$(this).index(); // $(this).addClass('active').siblings().removeClass('active'); var $loutitop= $('.louti').eq(idx).offset().top; //鑾峰彇姣忎釜妤兼鐨刼ffsetTop鍊 $('html,body').animate({//$('html,body')鍏煎闂body灞炰簬chrome scrollTop:$loutitop }) }); }) }); var width = $(window).width(); if (width <= 1024) { var swiper_team = new Swiper('.team-swiper .swiper-container', { speed: 800, autoplay: 4000, effect: 'slide', slidesPerView: '2', freeMode: true, spaceBetween: 20, loop: false, autoplayDisableOnInteraction: false, pagination: '.team-swiper .swiper-pagination', paginationType: 'progress', nextButton: '.team-swiper .bt-right', prevButton: '.team-swiper .bt-left', }); var swiper_honor = new Swiper('.honor-swiper .swiper-container', { speed: 800, autoplay: 4000, effect: 'slide', slidesPerView: '2', freeMode: false, spaceBetween: 20, loop: false, autoplayDisableOnInteraction: false, nextButton: '.honor-swiper .bt-right', prevButton: '.honor-swiper .bt-left', }); } else { var swiper_team = new Swiper('.team-swiper .swiper-container', { speed: 800, autoplay: 4000, effect: 'slide', slidesPerView: '3', freeMode: true, spaceBetween: 160, loop: false, autoplayDisableOnInteraction: false, pagination: '.team-swiper .swiper-pagination', paginationType: 'progress', nextButton: '.team-swiper .bt-right', prevButton: '.team-swiper .bt-left', }); var swiper_honor = new Swiper('.honor-swiper .swiper-container', { speed: 800, autoplay: 4000, effect: 'slide', slidesPerView: '3', freeMode: false, loop: false, autoplayDisableOnInteraction: false, nextButton: '.honor-swiper .bt-right', prevButton: '.honor-swiper .bt-left', }); }