// 全屏滑动 $(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'); }); $(".leftmgs .top").hover(function(){ $(this).find('.phone').attr('src','static/images/phone_ho.png'); $(this).find('.ixnd').show(); },function(){ $(this).find('.phone').attr('src','static/images/phone.png'); $(this).find('.ixnd').hide(); }) $(".leftmgs .bottom").hover(function(){ $(this).find('.mes').attr('src','static/images/mes_ho.png'); // $(this).find('.ixnd').show(); },function(){ $(this).find('.mes').attr('src','static/images/mes.png'); // $(this).find('.ixnd').hide(); }) $(".leftmgs .bottom .ixnd a").click(function(){ $(".fixed-product-consulting").show(); }) $(".leftmgs .bottom .mes").click(function(){ $(".fixed-product-consulting").show(); }) $(".product-consulting-close").click(function(){ $(".fixed-product-consulting").hide(); })