$(function () { var i = 0; $(".phone-nav").click(function () { i++; if (i % 2 == 1) { $(".phone-ul").slideDown(); } if (i % 2 == 0) { $(".phone-ul").slideUp(); } }); }); $(function () { //产品导航旋转 var menu = document.getElementsByClassName("menu-nav")[0]; var i = 0; $(".pro-title-click ").click(function () { i++; if (i % 2 == 1) { menu.style.transform = 'rotate(180deg)'; } if (i % 2 == 0) { menu.style.transform = 'rotate(0deg)'; } }); }); function fun1() { var span = document.getElementById("no-span"); var phone = document.getElementsByClassName("phone-nav")[0]; var span1 = document.getElementById("span1"); var span2 = document.getElementById("span2"); console.log(span) var i = 0; phone.onclick = function () { i++; if (i % 2 == 1) { span.style.display = "none"; span1.style.transform = 'rotate(35deg)'; span2.style.transform = 'rotate(-35deg)'; span1.style.top = 9 + "px" span2.style.top = 2 + "px" } if (i % 2 == 0) { span.style.display = "block"; span1.style.transform = 'rotate(0deg)'; span2.style.transform = 'rotate(0deg)'; span1.style.top = 0 + "px" span2.style.top = 0 + "px" } } } fun1() $(function () { //轮播图 //大图 var bannerswiper = new Swiper('.banner .swiper-container', { speed: 800, //effect: 'fade', 切换效果 roundLengths: true, loop: true, // slidesPerGroup:3, spaceBetween: 0, // slidesPerColumn : 2, // slidesPerColumnFill : 'row', autoplay: { delay: 3000 }, disableOnInteraction: false, pagination: { el: '.banner .swiper-pagination', clickable: true, }, navigation: { nextEl: '.banner .swiper-button-next', prevEl: '.banner .swiper-button-prev', }, breakpoints: { 767: { slidesPerView: 1, loop: true, spaceBetween: 0 } } }) var mySwiper = new Swiper('.banner2 .swiper-container', { slidesPerView: 5, //一排几个 // slidesPerColumn: 2 显示两行 slidesPerColumnFill: 'row', spaceBetween: 0, //间距 autoplay: { delay: 3000 //时间 }, breakpoints: { 767: { slidesPerView: 3, spaceBetween: 20 //间距 } } }) var mySwiper = new Swiper('.banner3 .swiper-container', { slidesPerView: 3, //一排几个 // slidesPerColumn: 2 显示两行 slidesPerColumnFill: 'row', spaceBetween: 30, //间距 autoplay: { delay: 3000 //时间 }, breakpoints: { 767: { slidesPerView: 2, spaceBetween: 15 //间距 } } }) var mySwiper = new Swiper('.banner4 .swiper-container', { slidesPerView: 3, spaceBetween: 40, //间距 centeredSlides: true, loop: true, autoplay: { delay: 3000 }, navigation: { nextEl: '.banner4 .swiper-button-next', prevEl: '.banner4 .swiper-button-prev', }, breakpoints: { 767: { slidesPerView: 3, // centeredSlides: false, spaceBetween: 0 //闂磋窛 } } }) var mySwiper = new Swiper('.banner5 .swiper-container', { slidesPerView: 5, //一排几个 // slidesPerColumn: 2 显示两行 slidesPerColumnFill: 'row', spaceBetween: 28, //间距 autoplay: { delay: 3000 //时间 }, breakpoints: { 767: { slidesPerView: 2, spaceBetween: 15 //间距 } } }) var mySwiper = new Swiper('.banner6 .swiper-container', { slidesPerView: 6, //一排几个 // slidesPerColumn: 2 显示两行 slidesPerColumnFill: 'row', spaceBetween: 30, //间距 autoplay: { delay: 3000 //时间 }, navigation: { nextEl: '.banner6 .swiper-button-next', prevEl: '.banner6 .swiper-button-prev', }, breakpoints: { 767: { slidesPerView: 3, spaceBetween: 15 //间距 } } }) var mySwiper = new Swiper('.banner7 .swiper-container', { slidesPerView: 3, //一排几个 // slidesPerColumn: 2 显示两行 slidesPerColumnFill: 'row', spaceBetween: 47, //间距 autoplay: { delay: 2000 //时间 }, breakpoints: { 767: { slidesPerView: 1, spaceBetween: 0 //间距 } } }) var mySwiper = new Swiper('.banner8 .swiper-container', { slidesPerView: 5, //一排几个 // slidesPerColumn: 2 显示两行 slidesPerColumnFill: 'row', spaceBetween: 35, //间距 autoplay: { delay: 2000 //时间 }, loop: true, breakpoints: { 767: { slidesPerView: 2, spaceBetween: 0 //间距 } } }) }) $(function () { //电脑端导航 $("li").hover(function () { $(this).has(".hover-ul").children(".hover-ul").stop(true, true).slideToggle(500); }, function () { $(this).has(".hover-ul").children(".hover-ul").stop(true).slideUp(500); }); $(".page-pro-lis>a").click(function (event) { //产品左侧弹出 // content ... $(this).next(".block-ul").slideToggle(); $(this).parent().siblings().find(".block-ul ").slideUp(); }); $(".page-pro>ul>li ").click(function () { //产品左侧 $(this).addClass("lu").siblings().removeClass("lu"); }) $(".page-pro>ul>li>a").click(function () { $(this).toggleClass("zhuan").siblings().removeClass("zhuan").parent().siblings().children("a").removeClass("zhuan"); }) }); $(function () { var i = 0; $(".pro-title-click").click(function () { i++; if (i % 2 == 1) { $(".pro-title-click-ul").slideDown(); } if (i % 2 == 0 && screen.width < 768) { $(".pro-title-click-ul").slideUp(); } }); }); $(function () { var i = 0; $("#qr-block").click(function () { i++; console.log(i); if (i % 2 == 1) { $(".hot>.qr-box").slideDown(); } if (i % 2 == 0) { $(".hot>.qr-box").slideUp(); } }); }); $(function () { //手机底部 $("#copy_btn").click(function () { $(" .view-wecht-box").slideDown(); }) $(".view-wecht-box .queren").click(function () { $(" .view-wecht-box").slideUp(); }); $("#dh-but1").click(function () { $(".haoma").slideDown(); console.log("sss") }) $(".quxiao").click(function () { $(".haoma").slideUp(); }) }); $(window).scroll(function () { //头部导航固定 var topheight = $(".top").outerHeight(); var topnavheight = $(".top-nav").outerHeight(); var scrollTopheight = topheight + topnavheight; if ($(this).scrollTop() > scrollTopheight) { $("header").css("position", "fixed"); } else { $("header").css("position", "relative"); } }) if (screen.width < 991) { //手机导航固定 $(window).scroll(function () { var phoneheight = $(".phone").outerHeight(); if ($(this).scrollTop() > phoneheight) { $(".phone").css({ "position": "fixed" }); } else { $(".phone").css({ "position": "relative" }); } }) } $(function () { $(".banner6 ul li").click(function () { $(".zc .box-big>.box").eq($(this).index()).fadeIn().siblings().stop().hide(); }) }) $(function () { $(".banner6 ul li").click(function () { $(this).addClass("teshu"); $(this).siblings().removeClass("teshu"); }) }) new WOW().init();