$(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();