// 全屏滑动 $(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"); }); 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 swiper1 = new swiper(".swiper1", { loop: true, autoplay: 10000, speed: 500, autoplaydisableoninteraction: true, slidesperview: 1, spacebetween: 0, effect: "fade", prevbutton: ".prev1", nextbutton: ".next1", fade: { crossfade: true, }, breakpoints: { //当宽度小于等于960 960: { pagination: ".pagination1", }, }, onslidechangestart: function (swiper1) {}, }); // 首页 var swiper_bd = new swiper(".swiper_bd", { // autoplay: 3000, speed: 800, autoplaydisableoninteraction: false, slidesperview: "auto", direction: "vertical", spacebetween: 0, noswiping: false, direction: "vertical", mousewheelcontrol: true, noswipingclass: "stop-swiping", paginationclickable: true, breakpoints: { //当宽度小于等于960 960: {}, }, ontransitionend: function (swiper_bd) { if (swiper_bd.progress == 1) { swiper_bd.activeindex = swiper_bd.slides.length - 1; } var idx = swiper_bd.realindex; if (idx > 0) { $("#index .header").addclass("fixed"); } else { $("#index .header").removeclass("fixed"); } }, onslidechangestart: function (swiper) { if ($(this).index() == -1) { $(".counter").countup(); } }, onslidechangeend: function (swiper) { if ($(this).index() == -1) { $(".counter").countup(); } }, }); var swiper2 = new swiper(".swiper2", { loop: false, noswiping: true, slidesperview: 3, spacebetween: 40, prevbutton: ".prev2", nextbutton: ".next2", breakpoints: { //当宽度小于等于960 960: { loop: true, autoplay: 5000, slidesperview: 1, noswiping: false, pagination: ".pagination2", }, }, }); // 首页 var swiper3 = new swiper(".swiper3", { loop: false, noswiping: true, slidesperview: 3, spacebetween: 40, breakpoints: { //当宽度小于等于960 960: { loop: true, autoplay: 5000, slidesperview: 1, noswiping: false, pagination: ".pagination3", }, }, }); // product var swiper4 = new swiper(".swiper4", { loop: true, autoplay: 6000, speed: 500, noswiping: true, slidesperview: 1, // spacebetween: 40, pagination: ".pagination4", paginationclickable: true, breakpoints: { //当宽度小于等于960 960: {}, }, }); // 解决方案 var swiper5 = new swiper(".swiper5", { loop: true, autoplay: 3000, speed: 500, slidesperview: 4, spacebetween: 20, breakpoints: { //当宽度小于等于960 960: { slidesperview: 1, noswiping: false, pagination: ".pagination5", }, }, }); // 解决方案 var swiper6 = new swiper(".swiper6", { loop: true, autoplay: 5000, speed: 500, slidesperview: 6, spacebetween: 20, breakpoints: { //当宽度小于等于960 960: { slidesperview: 1, noswiping: false, pagination: ".pagination6", }, }, }); var swiper7 = new swiper(".swiper7", { loop: true, autoplay: 5000, speed: 500, slidesperview: 2.5, spacebetween: 20, prevbutton: ".prev7", nextbutton: ".next7", pagination: ".pagination7", paginationtype: "fraction", breakpoints: { //当宽度小于等于960 960: { slidesperview: 1, }, }, }); var swiper8 = new swiper(".swiper8", { loop: true, autoplay: 5000, speed: 500, slidesperview: 2.5, spacebetween: 40, prevbutton: ".prev8", nextbutton: ".next8", pagination: ".pagination8", paginationtype: "fraction", breakpoints: { //当宽度小于等于960 960: { slidesperview: 1, pagination: "", }, }, }); var swiper9 = new swiper(".swiper9", { loop: true, autoplay: 5000, speed: 500, slidesperview: 2.5, spacebetween: 40, prevbutton: ".prev9", nextbutton: ".next9", pagination: ".pagination9", paginationtype: "fraction", breakpoints: { //当宽度小于等于960 960: { slidesperview: 1, pagination: "", }, }, }); var swiper10 = new swiper(".swiper10", { breakpoints: { //当宽度小于等于960 960: { loop: true, autoplay: 5000, slidesperview: 1, pagination: ".pagination10", }, }, }); var swiper11 = new swiper(".swiper11", { loop: true, autoplay: 5000, speed: 500, slidesperview: 3, spacebetween: 40, prevbutton: ".prev11", nextbutton: ".next11", breakpoints: { //当宽度小于等于960 960: { slidesperview: 1, pagination: "", pagination: ".pagination11", }, }, }); var swiper12 = new swiper(".swiper12", { loop: true, autoplay: 5000, speed: 500, slidesperview: 3, spacebetween: 40, prevbutton: ".prev12", nextbutton: ".next12", breakpoints: { //当宽度小于等于960 960: { slidesperview: 1, pagination: "", pagination: ".pagination12", }, }, }); $(".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"); });