if ($(window).width() > 980) { new WOW().init(); } $('.h_nav').click(function (e) { $("nav").toggleClass('show'); $(this).toggleClass('close'); }) var banSwiper = new Swiper('#banSwiper', { autoplay: { delay: 5000, disableOnInteraction: false, }, pagination: { el: ".banner-pagination", clickable: true, }, on: { init: function () { swiperAnimateCache(this); //隐藏动画元素 swiperAnimate(this); //初始化完成开始动画 }, slideChangeTransitionEnd: function () { swiperAnimate(this); //每个slide切换结束时也运行当前slide动画 } } }) $('.play-btn').click(function (e) { $('div.video-play').show(); var src = $(this).find('video').attr('src') || $(this).find('video').find('source').attr('src') || $(this).data('src') // console.log(src) $("#video").attr('src', src); $('body').css('overflow', 'hidden'); }); $('div.close-btn').click(function (e) { $('div.video-play').hide(); $("#video").attr('src', ''); $('body').css('overflow', 'auto'); }); $('.video-bg').click(function (e) { $('div.video-play').hide(); $('body').css('overflow', 'auto'); }); $(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 idxProSwiper = new Swiper('.idxProSwiper', { autoplay: true, loop: true, navigation: { nextEl: '.idxPro .next', prevEl: '.idxPro .prev', }, }) var newlistSwiper = new Swiper('.newlistSwiper .swiper-container', { autoplay: true, loop: true, navigation: { nextEl: '.newlistSwiper .next', prevEl: '.newlistSwiper .prev', }, }) var idxNewSwiper = new Swiper('.idxNewSwiper', { breakpoints: { //当宽度大于等于320 320: { spaceBetween: 25, slidesPerView: 1.2, }, 750: { spaceBetween: 50, slidesPerView: 2, }, 1280: { spaceBetween: 20, slidesPerView: 3, allowTouchMove: false, }, 1440: { spaceBetween: 30, slidesPerView: 3, allowTouchMove: false, }, }, }) $('.ewmTop a').hover(function(){ var index = $(this).index(); $(this).addClass('on').siblings().removeClass('on'); $('.ewmTopewm .img').removeClass('on').eq(index).addClass('on'); }) var listproSwiper = new Swiper('.listproSwiper', { centeredSlides: true, // autoplay: true, autoplay: { delay: 6000, disableOnInteraction: false, }, loop: true, slideToClickedSlide: true, breakpoints: { //当宽度大于等于320 320: { spaceBetween: 0, slidesPerView: 1.6, }, 750: { spaceBetween: 0, slidesPerView: 2, }, 1280: { spaceBetween: 0, slidesPerView:3.8, }, }, }) var leftSwiper = new Swiper('.leftSwiper', { spaceBetween: 0, slidesPerView: 3, simulateTouch : false, direction: "vertical", centeredSlides: true, freeMode: true, watchSlidesVisibility: true, watchSlidesProgress: true, }); var rightSwiper = new Swiper('.rightSwiper', { autoHeight: true, spaceBetween: 10, navigation: { nextEl: '.hisRight .next', prevEl: '.hisRight .prev', }, thumbs: { swiper: leftSwiper } }); 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, }, }, }); $('.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(); });