if ($(window).width() > 980) { new WOW().init(); } $('.h_nav').click(function (e) { $(".nav").toggleClass('show'); $(this).toggleClass('close'); }) $('.nav a').click(function (e) { $(".nav").removeClass('show'); $('.h_nav').removeClass('close'); }) $('.go-child ').click(function (e) { $(this).toggleClass('on').siblings().removeClass('on');; $(this).find('.nav-down').slideToggle().parent().siblings().find(".nav-down").slideUp(200);; }); var banSwiper = new Swiper('#banSwiper', { autoplay: { delay: 6000, disableOnInteraction: false, }, speed: 1000, pagination: { el: ".banner .svg-swiper-pagination", clickable: !0, renderBullet: function (e, i) { return '
' } }, // 如果需要滚动条 scrollbar: { el: '.banner .swiper-scrollbar1', }, on: { init: function () { swiperAnimateCache(this); //隐藏动画元素 swiperAnimate(this); //初始化完成开始动画 }, slideChangeTransitionEnd: function () { swiperAnimate(this); //每个slide切换结束时也运行当前slide动画 } } }) $('.idxProUl li').hover(function () { var index = $(this).index(); $(this).addClass('on').siblings().removeClass('on'); } ); var proSwiper = new Swiper('#proSwiper', { //loop: true, autoplay: true, spaceBetween: 20, slidesPerView: 1.2, }) var newsSwiper = new Swiper('#newsSwiper', { loop: true, autoplay: true, breakpoints: { //当宽度大于等于320 320: { spaceBetween: 25, slidesPerView: 1.2, }, 750: { spaceBetween: 20, slidesPerView: 3, }, 1280: { spaceBetween: 40, slidesPerView: 3, }, 1440: { spaceBetween: 45, slidesPerView: 3.3, }, }, }) $(window).on('scroll', function () { if ($(window).scrollTop() > 150) { $(".page-aside").addClass("show") } else { $(".page-aside").removeClass("show") } }); $(".j-gotop").click((function () { $("html, body").animate({ scrollTop: 0 }, 400) })) var historyTxt = new Swiper('#historyTxt', { // centeredSlides: true, // mousewheel: true, breakpoints: { //当宽度大于等于320 320: { direction: "horizontal", slidesPerView :'auto', freeMode : true, spaceBetween: 0, autoHeight: true, }, 750: { direction: "vertical", slidesPerView :'auto', freeMode : true, spaceBetween: 25, }, 1280: { direction: "vertical", slidesPerView :'auto', freeMode : true, spaceBetween: 40, } , 1440: { direction: "vertical", slidesPerView :'auto', freeMode : false, spaceBetween:60, } }, watchSlidesVisibility: true, watchSlidesProgress: true, on: { slideChangeTransitionStart: function () { } } }); var galleryTop = new Swiper('#historyImg', { navigation: { nextEl: '.history .next', prevEl: '.history .prev', }, thumbs: { swiper: historyTxt } }); var styleSwiper = new Swiper('#styleSwiper', { loop: true, autoplay: true, centeredSlides: true, pagination: { el: '.style .style-pagination', clickable: true, }, navigation: { nextEl: '.style .next', prevEl: '.style .prev', }, breakpoints: { //当宽度大于等于320 320: { spaceBetween: 20, slidesPerView: 1.4, }, 750: { spaceBetween: 20, slidesPerView: 3, }, 1280: { spaceBetween: 20, slidesPerView:3.6, }, 1440: { spaceBetween: 30, slidesPerView:3.6, }, }, }) $('.joblist li ').click(function(){ var index = $(this).index(); // $(this).children('.').slideToggle() ; $(this).find('.bottom').slideToggle().parent().siblings().find(".bottom").slideUp( );; }) //猪鼻孔小圈鼠标跟随 $(".pigdesk").on("mousemove", function (event) { event = event ? event : window.event; var y1 = event.pageY - $(this).offset().top; var x1 = event.pageX - $(this).offset().left; $(this).find(".pig").css({ "top": y1, "left": x1 }); }).hover(function () { $(this).find(".pig").addClass("show"); }, function () { $(this).find(".pig").removeClass("show"); }).on("mousedown", function () { $(this).find(".pig").addClass("active"); }).on("mouseup", function () { $(this).find(".pig").removeClass("active"); }); $('.pigdesk').hover(function () { $('.cursor-dot').hide(); }, function () { $('.cursor-dot').show(); }); var honorSwiper = new Swiper('#honorSwiper', { autoplay: true, loop: true, navigation: { nextEl: '.honor .next', prevEl: '.honor .prev', }, // 如果需要滚动条 pagination: { el: '.honor .honor-scrollbar', type: "progressbar", }, breakpoints: { //当宽度大于等于320 320: { spaceBetween: 25, slidesPerView: 1.2, }, 750: { spaceBetween: 40, slidesPerView: 2, }, 1280: { spaceBetween: 40, slidesPerView: 2.6, }, 1440: { spaceBetween: 50, slidesPerView: 2.8, }, }, });