// document.oncontextmenu = function(){ // return false; // } // if (typeof(document.onselectstart) != 'undefined') { // document.onselectstart = function(){ // return false; // } // } else { // document.write(''); // } // WOW动画 if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))) { new WOW().init(); }; //导航 var off=true; $(".navTrigger").click(function () { if(off==true){ $(this).addClass("navTrigger-on"); $('.wapNav').addClass("nav_on"); off=false; }else{ $(this).removeClass("navTrigger-on"); $(".wapNav").removeClass("nav_on"); off=true; } }); $('.wapNav .m').click(function(){ $(this).children('.navSub').slideToggle().end().siblings('.m').children('.navSub').slideUp(); $(this).addClass('on').siblings('li').removeClass('on'); }); $('.menuIcon').click(function() { $('.sidebar').stop(true, false).slideToggle(); }); $('.sidebarMenu>li').click(function() { $(this).children('ul').slideToggle().end().siblings('.m').children('.ul').slideUp(); $(this).addClass('cur').siblings('li').removeClass('cur'); }); $('.header .lang').click(function() { $('.langMain').stop(true, false).slideToggle(); }); /* 客服 */ $(document).ready(function() { $(".sz-kefu .kf1").click(function() { $('.sz-kefu .qq').find(".sidebox").stop().animate({ "right": "0" }, 160); $(this).find(".sidebox").stop().animate({ "right": "-50px" }, 160); }); $(".sz-kefu .qq .close").click(function() { $('.sz-kefu .qq').find(".sidebox").stop().animate({ "right": "-150px" }, 160); $('.sz-kefu .kf1').find(".sidebox").stop().animate({ "right": "0" }, 160); }); $(".sz-kefu .kf3").hover(function() { $(this).find(".sidebox").stop().animate({ "width": "130px" }, 160); $(this).find(".sidebox3").stop().animate({ "width": "200px" }, 160); }, function() { $(this).find(".sidebox").stop().animate({ "width": "50px" }, 160); }); $('.sz-kefu .kf2').hover(function() { $(this).find('.kf_wx').fadeIn(); }, function() { $(this).find('.kf_wx').fadeOut(); }); }); //回到顶部 function goTop() { $('html,body').animate({ 'scrollTop': 0 }, 600); } $(".search-btn").on("click",function(){ $(".search-bar").toggleClass("show"); }) if ($('.header').length > 0) { // console.log('yes'); var pTop=$('.header').position().top; $(document).scroll(function(e){ if($(document).scrollTop()>pTop){ $('.header').addClass('fixed') }else{ $('.header').removeClass('fixed') }; }); } // 产品列表左侧菜单 $(".cate-side .item h3").on('click',function(){ // $(this).parent().toggleClass("on"); // $(this).parent().siblings().slideToggle(); $(this).toggleClass("on"); $(this).siblings().slideToggle(); }) // 首页轮播图 var Swiper1 = new Swiper('#banner-swiper', { pagination: { el: '#banner-swiper .swiper-pagination', clickable: true, }, navigation: { nextEl: '#banner-swiper .banner-next', prevEl: '#banner-swiper .banner-prev', }, autoplay: true, autoplay: { delay: 6000 }, loop: true, speed: 800, }); // 首页钜惠特卖tab var productTab = new Swiper('.product-tab-content', { slidesPerView: 1, spaceBetween: 20, autoplay: false, loop: false, speed: 500, on: { slideChangeTransitionStart: function() { $(".product-cate-tab .on").removeClass('on'); $(".product-cate-tab li").eq(this.activeIndex).addClass('on'); } } }) $(".product-cate-tab li").on('click', function(e) { e.preventDefault(); $(".product-cate-tab li.on").removeClass('on'); $(this).addClass('on'); productTab.slideTo($(this).index()); }) // 首页荣誉证书 var honorSwiper = new Swiper('.index-honor-list', { slidesPerView: 4, spaceBetween: 20, autoplay: { delay: 3000, }, speed: 500, loop: true, navigation: { nextEl: '.index-honor .next', prevEl: '.index-honor .prev', }, breakpoints: { 1800: { slidesPerView: 3, spaceBetween: 20, }, 1250: { slidesPerView: 2, }, 991: { slidesPerView: 2, }, 767: { slidesPerView: 2, }, } }) // 首页行业应用tab var useTab = new Swiper('.use-content', { slidesPerView: 1, spaceBetween: 0, autoplay: false, loop: false, speed: 500, on: { slideChangeTransitionStart: function() { $(".use-cate .on").removeClass('on'); $(".use-cate li").eq(this.activeIndex).addClass('on'); } } }) $(".use-cate li").on('click', function(e) { e.preventDefault(); $(".use-cate li.on").removeClass('on'); $(this).addClass('on'); useTab.slideTo($(this).index()); }) // 首页新闻tab var newsTab = new Swiper('.news-tab-content', { slidesPerView: 1, spaceBetween: 20, autoplay: false, loop: false, speed: 500, on: { slideChangeTransitionStart: function() { $(".news-tab .on").removeClass('on'); $(".news-tab li").eq(this.activeIndex).addClass('on'); } } }) $(".news-tab li").on('click', function(e) { e.preventDefault(); $(".news-tab li.on").removeClass('on'); $(this).addClass('on'); newsTab.slideTo($(this).index()); }) // 产品详情 // 相关应用 use-slde-content var xguseSwiper = new Swiper('.use-slde-content', { slidesPerView: 2, spaceBetween: 30, autoplay: { delay: 4000, }, speed: 500, loop: true, navigation: { nextEl: '.use-slide-wrap .next', prevEl: '.use-slide-wrap .prev', }, breakpoints: { 767: { slidesPerView: 1, }, } }) // 关于荣誉证书 var aboutHonorSwiper = new Swiper('.about-honor-list', { slidesPerView: 3, spaceBetween: 20, autoplay: { delay: 3000, }, speed: 500, loop: true, pagination: { el: '.about-honor-list .swiper-pagination', clickable: true, }, breakpoints: { 1800: { slidesPerView: 2, }, 991: { slidesPerView: 2, }, 767: { slidesPerView: 2, }, } }) // 分公司 var companySwiper = new Swiper('.company-list', { slidesPerView: 4, spaceBetween: 20, autoplay: { delay: 3000, }, speed: 400, loop: false, pagination: { el: '.company-list .swiper-pagination', clickable: true, }, breakpoints: { 1800: { slidesPerView: 2, }, 991: { slidesPerView: 2, }, 767: { slidesPerView: 1, }, } }) // 关于团队 var albumSwiper = new Swiper('.about-album-swiper', { slidesPerView: 3, spaceBetween: 100, autoplay: { delay: 3000, }, centeredSlides: true, speed: 500, loop: true, pagination: { el: '.about-album-swiper .swiper-pagination', clickable: true, }, breakpoints: { 1250: { slidesPerView: 2, }, 991: { slidesPerView: 2, }, 767: { slidesPerView: 1, }, } }) // 列表案例 old var caseSwiper1 = new Swiper('#s1', { slidesPerView: 'auto', // centeredSlides: true, autoplay: true, autoplay: { delay: 6000 }, loop: false, pagination: { el: '#s1 .swp', clickable: true, } }); var caseSwiper2 = new Swiper('#s2', { slidesPerView: 'auto', // centeredSlides: true, autoplay: true, autoplay: { delay: 6000 }, loop: false, pagination: { el: '#s2 .swp', clickable: true, } }); var caseSwiper3 = new Swiper('#s3', { slidesPerView: 'auto', // centeredSlides: true, autoplay: true, autoplay: { delay: 6000 }, loop: false, pagination: { el: '#s3 .swp', clickable: true, } }); var caseSwiper4 = new Swiper('#s4', { slidesPerView: 'auto', // centeredSlides: true, autoplay: true, autoplay: { delay: 6000 }, loop: false, pagination: { el: '#s4 .swp', clickable: true, } }); // brand-content var cateswiper = new Swiper('.brand-content', { slidesPerView: 11, spaceBetween: 20, freeMode: true, breakpoints: { 768: { spaceBetween: 10, slidesPerView: 4, }, } });