$(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 () { //轮播图 //大图 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: 4, //一排几个 // slidesPerColumn: 2 显示两行 slidesPerColumnFill: 'row', spaceBetween: 5, //间距 autoplay: { delay: 3000 //时间 }, breakpoints: { 767: { slidesPerView: 2, spaceBetween: 10 //间距 } } }) var mySwiper = new Swiper('.banner3 .swiper-container', { slidesPerView: 1, //一排几个 // slidesPerColumn: 2 显示两行 slidesPerColumnFill: 'row', spaceBetween: 0, //间距 autoplay: { delay: 3000 //时间 }, navigation: { nextEl: '.banner3 .swiper-button-next', prevEl: '.banner3 .swiper-button-prev', }, breakpoints: { 767: { slidesPerView: 1, spaceBetween: 0 //间距 } } }) var mySwiper = new Swiper('.banner4 .swiper-container', { slidesPerView: 8, //一排几个 slidesPerColumn: 2, slidesPerColumnFill: 'row', spaceBetween: 30, //间距 autoplay: { delay: 3000 //时间 }, }) }) $(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(); }) }); 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 () { $(".header-right .btn").click(function () { $(".main-menu-wrapper").animate({ right: "0" }, 500); $(".main-menu-wrapper ul.menu li ul").slideUp(); $(".main-menu-wrapper ul.menu li .arr").removeClass("active") $(".mengban").show(); }); $(".phone-nav").click(function () { $(".main-menu-wrapper").animate({ right: "0" }, 500); }); $(".main-menu-wrapper .xx>img").click(function () { $(".main-menu-wrapper").animate({ right: "-100%" }, 500); $(".mengban").hide(); }); $(".main-menu-wrapper ul.menu li .arr").click(function () { $(this).toggleClass("active"); $(this).parents("li").find("ul").slideToggle(); }) }) $(function () { $(".product-right .ul-box .two-ul li").click(function () { $(this).addClass("red"); $(this).siblings().removeClass("red"); }); $(".product-right .ul-box .two-ul li").click(function () { $(".product-left>.box").eq($(this).index()).fadeIn().siblings().stop().hide(); }) }) new WOW().init();