//移动端菜单按钮 $('.menu-button').click(function () { if ($('body').hasClass("menu-open")) { $('body').removeClass("menu-open"); $('#menu').removeClass('open'); $('.menu-nav li').removeAttr("style", ""); $('.menu-contact div p').removeAttr("style", ""); $('.menu-contact div h3').removeAttr("style", ""); } else { $('body').addClass("menu-open"); $('#menu').addClass('open'); $('.menu-nav li').each(function (i, e) { $(this).css({ 'transition-delay': 200 + 40 * i + 'ms', '-webkit-transition-delay': 200 + 40 * i + 'ms' }) }); $('.menu-contact div h3').each(function (i, e) { $(this).css({ 'transition-delay': 600 + 'ms', '-webkit-transition-delay': 600 + 'ms' }) }); $('.menu-contact div p').each(function (i, e) { $(this).css({ 'transition-delay': 600 + 40 * i + 'ms', '-webkit-transition-delay': 600 + 40 * i + 'ms' }) }); } }); //搜索 $('#search .search-button').click(function (event) { $(this).parents("#search").toggleClass('open'); }); $('#search').click(function (event) { event.stopPropagation(event); }); $('body').click(function (event) { $("#search").removeClass('open'); }); //搜索 $('#language .language-button').click(function (event) { $(this).parents("#language").toggleClass('open'); }); $('#language').click(function (event) { event.stopPropagation(event); }); $('body').click(function (event) { $("#language").removeClass('open'); }); //banner $(function () { var owl = $('#banner'); owl.owlCarousel({ nav: true, navText: ['', ''], dots: false, items: 1, loop: true, autoplay: true, autoplayTimeout: 6000, smartSpeed: 1000, autoplayHoverPause: true, mouseDrag: false, touchDrag: false, animateOut: 'fadeOut', animateIn: 'fadeIn', onInitialized: counter1, //When the plugin has initialized. onTranslated: counter2 //When the translation of the stage has finished. }); //设置owl-nav生成项目计数div function counter1(event) { var items = event.item.count; $("#banner .owl-nav").prepend('
'); //在按钮处新增计数容器 $("#banner .owl-nav .owl-next").before('
'); //新增按钮间隔 var items = event.item.count; let item = (event.item.index + 1) - event.relatedTarget._clones.length / 2; let itemsCount = event.item.count; if (item > itemsCount) { item = 1; } if (item === 0) { item = event.item.count; } $('#counter').html('' + PrefixInteger(item, 2) + '' + ' / ' + PrefixInteger(items, 2)) } function counter2(event) { var items = event.item.count; let item = (event.item.index + 1) - event.relatedTarget._clones.length / 2; let itemsCount = event.item.count; if (item > itemsCount) { item = 1; } if (item === 0) { item = event.item.count; } $('#counter').html('' + PrefixInteger(item, 2) + '' + ' / ' + PrefixInteger(items, 2)) } //位数不足前面补0 function PrefixInteger(num, length) { return (Array(length).join('0') + num).slice(-length); } }); //banner $(function () { var owl = $('#index-p'); owl.owlCarousel({ nav: true, navText: ['', ''], dots: false, items: 3, loop: true, autoplay: true, autoplayTimeout: 6000, smartSpeed: 1000, autoplayHoverPause: true, touchDrag: false, responsive: { 0: { margin: 10, items: 1 }, 468: { margin: 15, items: 2 }, 768: { margin:20, items: 2 }, 992: { margin: 25, items: 3 }, 1200: { margin:30, items: 3 } }, onInitialized: counter1, //When the plugin has initialized. onTranslated: counter2 //When the translation of the stage has finished. }); //设置owl-nav生成项目计数div function counter1(event) { $("#index-p .owl-nav").prepend('
'); //在按钮处新增计数容器 var items = event.item.count; let item = (event.item.index + 1) - event.relatedTarget._clones.length / 2; let itemsCount = event.item.count; if (item > itemsCount) { item = 1; } if (item === 0) { item = event.item.count; } $('#counter2').html('' + PrefixInteger(item, 2) + '' + ' / ' + PrefixInteger(items, 2)) } function counter2(event) { var items = event.item.count; let item = (event.item.index + 1) - event.relatedTarget._clones.length / 2; let itemsCount = event.item.count; if (item > itemsCount) { item = 1; } if (item === 0) { item = event.item.count; } $('#counter2').html('' + PrefixInteger(item, 2) + '' + ' / ' + PrefixInteger(items, 2)) } //位数不足前面补0 function PrefixInteger(num, length) { return (Array(length).join('0') + num).slice(-length); } }); $(document).ready(function () { var owl = $('#index-app'); owl.owlCarousel({ nav: false, navText: ['', ''], loop: true, autoplay: true, autoplayTimeout: 5000, smartSpeed: 1000, autoplayHoverPause: true, responsive: { 0: { dots: true, margin: 10, items: 1 }, 468: { dots: true, margin: 20, items: 2 }, 768: { dots: true, margin: 30, items: 3 }, 992: { dots: false, margin: 30, items: 4 }, 1200: { dots: false, margin:30, items: 5 } }, }); }); $(document).ready(function () { var owl = $('#index-news'); owl.owlCarousel({ nav: true, navText: ['', ''], loop: true, autoplay: true, autoplayTimeout: 5000, smartSpeed: 1000, autoplayHoverPause: true, responsive: { 0: { dots: true, margin: 20, items: 1 }, 468: { dots: true, margin: 20, items: 2 }, 992: { dots: false, margin:20, items: 3 }, 1200: { dots: false, margin: 30, items: 3 } }, }); }); /*内页banner*/ $(window).bind("resize", function () { bannerBg() }); $(window).ready(function () { bannerBg() }); function bannerBg() { var wW = $(window).width(); var bannerWeb = $('.inside-banner').attr('web-bg'); var bannerwap = $('.inside-banner').attr('wap-bg'); //alert(bannerwap); if (wW > 992) { $(".inside-banner").css({ "background-image": "url(" + bannerWeb + ")" }); } else if (wW < 992) { $(".inside-banner").css({ "background-image": "url(" + bannerwap + ")" }); } }; //内页二级导航折叠 $(window).bind("resize", function () { pNav(); }); $(window).ready(function () { pNav(); }); //属性添加事件 function pNav(){ var wW=$(window).width(); if(wW<992){ $("#subnav .panel-button").addClass("collapsed"); $("#subnav .panel-collapse").removeClass("show"); $("#subnav .panel-collapse").attr("style",""); } else{ $("#subnav .panel-button").removeClass("collapsed"); $("#subnav .panel-collapse").addClass("show"); } }; //加入我们 jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g', ''], items: 1, loop: true, autoplay: true, autoplayTimeout: 5000, smartSpeed: 1000, lazyLoad: true, autoHeight: true, autoplayHoverPause: true, responsive: { 0: { dots: true, dotsData: false }, 992: { dots: true, dotsData: true } }, }) }); /*给产品介绍的表格添加父级标签*/ $('.product-details table').wrap('
');