//移动端导航 $(".selectBut").click(function() { $(".navm-box").toggleClass("act"); $("body").toggleClass("navShow"); if($(".selectBut").hasClass("hd1-aon1")) { $(this).removeClass("hd1-aon1"); } else { $(this).addClass("hd1-aon1"); } }) $(".nav-wrap .icon-jia").click(function(){ if($(this).parent().find("dl").is(":hidden")){ $(this).parent().find("dl").show(500); $(this).css("transform","rotate(180deg)") }else{ $(this).parent().find("dl").hide(500); $(this).css("transform","rotate(0deg)") } }); //搜索 $('.btn').on('click',function(){ $('.search-dialog-box').toggleClass("on"); }) $('.search-dialog-box .pub-close').on('click',function(){ $('.search-dialog-box').removeClass("on"); }) //banner var mySwiper1 = new Swiper('.banner .swiper-container', { speed:1200, loop:true, centeredSlides: true, autoplay: { delay: 5000, disableOnInteraction: false, }, pagination: { el: '.banner .swiper-pagination', clickable: true, } }); var jxkytxt = new Swiper('.news-txt', { loop:true, speed:800, noSwiping : true, noSwipingClass : 'no-swi', }); var jxkyimg = new Swiper('.news-img', { speed:800, loop:true, autoplay: { delay: 3000, disableOnInteraction: false, }, controller:{control: [ jxkytxt]}, pagination: { el: '.news-txt .swiper-pagination', clickable: true, }, }); //手风琴 $(function(){ $(".mt-list ul li").on("mousemove",function(){ $(this).addClass('on').siblings().removeClass('on'); }); }) //机械风采 var xywh1 = new Swiper('.pe-img', { speed: 800, loop: true, spaceBetween: 0, // allowTouchMove: false, autoplay: { delay: 5000, disableOnInteraction: false, } }); //数据机械 var swiper_laboratory = new Swiper(".m-banidx6 .swiper-container", { spaceBetween: 0, slidesPerView: 5, autoplay: false, autoplay: { delay: 3000, stopOnLastSlide: false, disableOnInteraction: true, }, loop: true, breakpoints: { //当宽度大于等于320 420: { slidesPerView: 1, centeredSlides: false, }, //当宽度大于等于480 767: { slidesPerView: 2, centeredSlides: false, }, //当宽度大于等于640 959: { slidesPerView: 3, centeredSlides: false, }, 1199: { slidesPerView: 4, }, }, on: { init: function(swiper){ $('.counts').countUp({delay: 20,time: 2000}); } } });