// 全屏滑动 $(function () { // 头部导航 /*锚点跳转*/ // 首页全屏轮播 // header var top = $(window).scrollTop(); $(".top").click(function () { $("html,body").animate({ scrollTop: 0 }, 1000); }); // 手机头部 $(".header_nav li").on("click", function () { $("a.ltp", this) .stop(true, false) .toggleClass("act") .parents("li") .siblings("li") .find("a.ltp") .stop(true, false) .removeClass("act"); $(".hd", this) .stop(true, false) .slideToggle() .parent(".qp") .parent("li") .siblings("li") .find(".hd") .stop(true, false) .slideUp(); }); $(".m_header .sanline").on("click", function () { $(".header_nav").addClass("act"); }); $(".sancha").on("click", function () { $(".header_nav").removeClass("act"); }); $(".header_nav li .qp .hd .hp a").on("click", function () { $(".header_nav").removeClass("act"); }); // 头部语言切换 $(".header .box .right_img_text .right .sel .sel_text").on("click", function () { $(".header .box .right_img_text .right .sel .ul_ch").stop(true, false).slideToggle(); $(this).parent(".sel").stop(true, false).toggleClass("act"); }) var w = $(window).width(); if (w > 1200) { if (!/msie [6|7|8|9]/i.test(navigator.userAgent)) { new WOW({ callback: function (box) { $(box).addClass("wow1"); }, }).init(); } $(window).resize(function () { new WOW({ callback: function (box) { $(box).addClass("wow1"); }, }).init(); }); $(window).scroll(function () { if ($(window).scrollTop() >= 100) { $(".head ").stop(true, false).addClass("act"); } else { $(".head").stop(true, false).removeClass("act"); } if ($(window).scrollTop() >= 400) { $(".top ").stop(true, false).addClass("act"); } else { $(".top").stop(true, false).removeClass("act"); } if ($(window).scrollTop() >= 80) { $(".t_daohang").stop(true, false).addClass("act"); } else { $(".t_daohang").stop(true, false).removeClass("act"); } }); setTimeout(function () { }, 100); $(".i1 video").trigger("play"); } if (w > 960) { } /*pc底部线条*/ $(".header .box .ul1 li").hover( function () { var idx = $(this).index(); // console.log(idx); $(".header .llline") .stop(true, false) .removeClass("act0 act1 act2 act3 act4 act5 act6 act7") .stop(true, false) .addClass(`act${idx}`); }, function () { } ); // 搜索框 $(".header .box .fr .right .img .img1 .c").on("click", function () { console.log("1"); $(".header .box .fr .right .img .img1").addClass("act"); $(".header .fr .right .img .ser").slideDown(); }); $(".header .box .fr .right .img .img1 .s").on("click", function () { console.log("1"); $(".header .box .fr .right .img .img1").removeClass("act"); $(".header .fr .right .img .ser").slideUp(); }); /*视频弹窗*/ $(".ab1 .irt .itp .img .bf").on("click", function () { $(".vd_tacnhuang").fadeIn(); $(".vd_tacnhuang video").trigger("play"); $("html").addClass("act"); }); $(".tacnhuang .tbox .out").on("click", function () { $(".tacnhuang").fadeOut(); $("html").removeClass("act"); }); $(".vd_tacnhuang .tbox .out").on("click", function () { $("tacnhuang video").trigger("pause"); $("html").removeClass("act"); }); /*招聘*/ /*手机头部*/ $(".m_navbox li").click(function () { $(this).stop(true, false).toggleClass("act").siblings().removeClass("act"); $(this).find(".lbt").stop(true, false).slideToggle(); $(this).siblings().find(".lbt").stop(true, false).slideUp(); }); $(".m_head .img").click(function () { $(".m_nav").addClass("act"); }); $(".m_out").click(function () { $(".m_nav").removeClass("act"); }); // PAD端 if (w < 1200 && w > 960) { } // 手机端 if (w < 960) { } }); // 首页js // $(function () { // var st = $(window).scrollTop(); // if (st > 0) { // $("#index .header").addClass("fixed"); // } else { // $("#index .header").removeClass("fixed"); // } // }); // 内页 $(function () { var st = $(window).scrollTop(); if (st > 0) { $("t_daohang").addClass("act"); } else { $("t_daohang").removeClass("act"); } }); var swiper2 = new Swiper(".swiper2", { loop: true, autoplay: 5000, noSwiping: true, noSwipingClass: 'stop-swiping', slidesPerView: 1, effect: 'fade', breakpoints: { //当宽度小于等于960 960: { }, }, }); var swiper3 = new Swiper(".swiper3", { loop: true, autoplay: 5000, slidesPerView: 'auto', spaceBetween: 190, freeMode: false, slidesOffsetBefore: 40, slideToClickedSlide:true, breakpoints: { //当宽度小于等于960 1680: { sspaceBetween: 150, }, 1440: { spaceBetween: 100, }, 1366: { spaceBetween: 70, }, 1280: { spaceBetween: 50, }, 960: { slidesPerView: 1, }, }, onSlideChangeStart: function (swiper3) { var idx = swiper3.realIndex; swiper2.slideTo(idx + 1, 800, false); } }); var swiper4 = new Swiper(".swiper4", { loop: false, autoplay: 5000, spaceBetween: 30, slidesPerView: "auto", pagination: '.pagination4', paginationType: 'progress', slidesOffsetAfter: 200, breakpoints: { //当宽度小于等于960 960: { slidesPerView: 1, spaceBetween: 0, slidesOffsetAfter: 0, }, }, }); var swiper8 = new Swiper(".swiper8", { loop: true, autoplay: 5000, speed: 500, slidesPerView: 1, pagination: ".pagination8", paginationClickable: true, freeMode: false, breakpoints: { //当宽度小于等于960 960: { }, }, }); $(".footer .down .right").hover( function () { $(this).find(".r_up").stop(true, false).slideDown(); }, function () { $(this).find(".r_up").stop(true, false).slideUp(); } ); $("#index .five .down .abox").hover( function () { $(this).find(".bg_b").addClass("act"); $(this).find(".more3").stop(true, false).slideDown(); }, function () { $(this).find(".bg_b").removeClass("act"); $(this).find(".more3").stop(true, false).slideUp(); } ); $("#index .four .down .ul1 li").hover(function () { var idx = $(this).index(); console.log(idx); $("#index .four .down .irt img") .eq(idx) .stop(true, false) .addClass("act") .siblings() .stop(true, false) .removeClass("act"); }); // 头部导航下拉 $(".header .box .ul1 li").hover( function () { $(this).find(".lbt").stop(true, false).slideDown(); }, function () { $(this).find(".lbt").stop(true, false).slideUp(); } ); $("#index .index_sc .swiper1 .swiper-slide .video_img").on('click', function () { $('.z_tanchuang').removeClass('out').addClass('one'); var src = $(this).attr('data-src'); $('html').addClass('act'); $(".z_tanchuang video").attr({ src: src }).trigger('play'); }); $('.z_tanchuang .out').on('click', function () { $('.z_tanchuang').addClass('out'); $('html').removeClass('act'); $(".z_tanchuang video").trigger('pause'); });