$(function(){ var wow = new WOW({}); wow.init(); // 通用 $('.head-menu').click(function(){ $(this).toggleClass('head-menu-close'); $('.nav').toggleClass('nav-open'); }); $('.nav .nav-item').mouseover(function(){ $(this).addClass('nav-item-on') }); $('.nav .nav-item').mouseout(function(){ $(this).removeClass('nav-item-on') }); $('.nav-item a').click(function(){ $('.head-menu').toggleClass('head-menu-close'); $('.nav').toggleClass('nav-open'); }) $(".banner-btn").click(function(){ var bannerH = $(".banner").height(); return $("body,html").animate({ scrollTop: bannerH, }, 500), !1 }); // 首页 var banSwiper = new Swiper(".banner-container", { speed: 800, effect: 'fade', autoplay: { delay: 5000, disableOnInteraction: false, }, loop: true, on: { init: function() { swiperAnimateCache(this); //隐藏动画元素 swiperAnimate(this); //初始化完成开始动画 }, slideChangeTransitionStart: function() { swiperAnimate(this); //每个slide切换结束时也运行当前slide动画 //this.slides.eq(this.activeIndex).find('.ani').removeClass('ani'); 动画只展现一次,去除ani类名 } } }); var iPro = new Swiper('.i-product-container', { speed: 500, effect: 'fade', fadeEffect: { crossFade: true, }, on: { slideChangeTransitionStart: function(){ $(".i-product-tabs .active").removeClass("active"); $(".i-product-tabs a").eq(this.activeIndex).addClass("active"); } } }); $(".i-product-tabs a").on("hover", function(e){ e.preventDefault(); $(".i-product-tabs .active").removeClass("active"); $(this).addClass("active"); iPro.slideTo($(this).index()); }); var iNews = new Swiper('.i-news-container', { speed: 500, effect: 'fade', fadeEffect: { crossFade: true, }, on: { slideChangeTransitionStart: function(){ $(".i-news-tabs .active").removeClass("active"); $(".i-news-tabs a").eq(this.activeIndex).addClass("active"); } } }); $(".i-news-tabs a").on("hover", function(e){ e.preventDefault(); $(".i-news-tabs .active").removeClass("active"); $(this).addClass("active"); iNews.slideTo($(this).index()); }); // 关于银河娱乐在线登录官网 $('.about-wrap2 .item-shape').mouseover(function(){ $(this).parent().addClass('item-on'); }); $('.about-wrap2 .item-shape').mouseout(function(){ $(this).parent().removeClass('item-on'); }); var teamImg = new Swiper('.team-img-container', { speed: 800, slidesPerView: 'auto', slidesPerGroup : 1, spaceBetween: 50, loop: true, // allowTouchMove: false, breakpoints: { 1024: { spaceBetween: 100, }, 1660: { spaceBetween: 200, }, }, controller: { control: teamText, }, }); var teamText = new Swiper(".team-text-container", { speed: 800, effect: 'fade', fadeEffect: { crossFade: true, }, loop: true, loopAdditionalSlides : 1, // autoHeight: true, allowTouchMove: false, }); $(".about-wrap3-btn .prev").click(function(){ teamText.slidePrev(); teamImg.slidePrev(); }); $(".about-wrap3-btn .next").click(function(){ teamText.slideNext(); teamImg.slideNext(); }); if($('.team-text-container').length>0){ teamImg.controller.control = teamText; } var aboutWrap4 = new Swiper(".about-wrap4-container", { speed: 800, slidesPerView: 1, breakpoints: { 1024: { slidesPerView: 4, }, }, pagination: { el: '.swiper-pagination', type: 'progressbar', }, navigation: { nextEl: '.about-wrap4-btn .next', prevEl: '.about-wrap4-btn .prev', }, }); var aboutWrap5 = new Swiper(".about-wrap5-container", { speed: 800, slidesPerView: 1, spaceBetween: 10, breakpoints: { 1024: { slidesPerView: 3, spaceBetween: 50, }, 1660: { slidesPerView: 3, spaceBetween: 136, }, }, }); $(".about-wrap5-btn .prev").click(function(){ aboutWrap5.slidePrev(); }); $(".about-wrap5-btn .next").click(function(){ aboutWrap5.slideNext(); }); // 产品 var productWrap2 = new Swiper('.product-wrap2-container', { speed: 500, effect: 'fade', fadeEffect: { crossFade: true, }, on: { slideChangeTransitionStart: function(){ $(".product-wrap2-tabs .active").removeClass("active"); $(".product-wrap2-tabs a").eq(this.activeIndex).addClass("active"); } } }); $(".product-wrap2-tabs a").on("hover", function(e){ e.preventDefault(); $(".product-wrap2-tabs .active").removeClass("active"); $(this).addClass("active"); productWrap2.slideTo($(this).index()); }); // 研发中心 var rdWrap1 = new Swiper(".rd-wrap1-main1 .rd-wrap1-container", { speed: 800, slidesPerView: 2, spaceBetween: 10, breakpoints: { 1024: { slidesPerView: 4, spaceBetween: 58, }, }, }); $(".rd-wrap1-main1 .prev").click(function(){ rdWrap1.slidePrev(); }); $(".rd-wrap1-main1 .next").click(function(){ rdWrap1.slideNext(); }); var rdWrap2 = new Swiper(".rd-wrap1-main2 .rd-wrap1-container", { speed: 800, slidesPerView: 2, spaceBetween: 10, breakpoints: { 1024: { slidesPerView: 4, spaceBetween: 58, }, }, }); $(".rd-wrap1-main2 .prev").click(function(){ rdWrap2.slidePrev(); }); $(".rd-wrap1-main2 .next").click(function(){ rdWrap2.slideNext(); }); var rdSlide = new Swiper('.rd-wrap1-slide', { speed: 800, effect : 'fade', fadeEffect: { crossFade: true, }, allowTouchMove: false, on: { slideChangeTransitionStart: function() { $(".rd-wrap1-nav .active").removeClass('active'); $(".rd-wrap1-nav a").eq(this.activeIndex).addClass('active'); } } }) $(".rd-wrap1-nav a").on('click', function(e) { e.preventDefault() $(".rd-wrap1-nav .active").removeClass('active') $(this).addClass('active'); rdSlide.slideTo($(this).index()); }); var rdWrap4 = new Swiper(".rd-wrap4-container", { speed: 800, slidesPerView: 2, spaceBetween: 10, breakpoints: { 1024: { slidesPerView: 3, spaceBetween: 108, }, }, }); $(".rd-wrap4-btn .prev").click(function(){ rdWrap4.slidePrev(); }); $(".rd-wrap4-btn .next").click(function(){ rdWrap4.slideNext(); }); var rdWrap5 = new Swiper(".rd-wrap5-container", { speed: 800, slidesPerView: 1, spaceBetween: 10, breakpoints: { 1024: { slidesPerView: 3, spaceBetween: 108, }, }, }); // 人力资源 $(".dd-top .dl-more span").click(function(){ $(this).parents("dd").toggleClass("dd-on"); $(this).parents("dd").find(".dd-con").stop().slideToggle(); }) });