//在线客服配置 $(document).ready(function(){ var hide=true;//true开启;false关闭 //var hide=false; if(hide==true){ //移动触发 $(".customer").hover(function(){ $(".customer_hide").hide(); $(".customer_show").show(); },function(){ $(".customer_hide").show(); $(".customer_show").hide(); }); } if(hide==false){ //不自动隐藏 $(".customer_hide").hide(); $(".customer_show").show(); //点击打开 $(".customer_hide").click( function () { $(this).hide(); $(".customer_show").show(); }); } //关闭按钮 $(".customer_close").click( function () { $(".customer_hide").show(); $(".customer_show").hide(); }); }); // 导航 $(function(){ //超过一定高度导航添加类名 var nav=$("header"); //得到导航对象 var win=$(window); //得到窗口对象 var sc=$(document);//得到document文档对象。 win.scroll(function(){ if(sc.scrolltop()>=100){ nav.addclass("on"); }else{ nav.removeclass("on"); } }) //移动端展开nav $('#navtoggle').on('click',function(){ $('.m_nav').addclass('open'); }) //关闭nav $('.m_nav .top .closed').on('click',function(){ $('.m_nav').removeclass('open'); }) //二级导航 移动端 //二级导航 移动端 $(".m_1").click(function() { $(this).next("div.dropdown_menu").slidetoggle('slow'); $(this).toggleclass("m_1"); $(this).toggleclass("m_bg"); }); $(".m_2").click(function() { $(this).next("div.dropdown_menu").slidetoggle('slow'); $(this).toggleclass("m_2"); $(this).toggleclass("m_bg"); }); $(".m_3").click(function() { $(this).next("div.dropdown_menu").slidetoggle('slow'); $(this).toggleclass("m_3"); $(this).toggleclass("m_bg"); }); $(".m_4").click(function() { $(this).next("div.dropdown_menu").slidetoggle('slow'); $(this).toggleclass("m_4"); $(this).toggleclass("m_bg"); }); $(".m_5").click(function() { $(this).next("div.dropdown_menu").slidetoggle('slow'); $(this).toggleclass("m_5"); $(this).toggleclass("m_bg"); }); $(".m_6").click(function() { $(this).next("div.dropdown_menu").slidetoggle('slow'); $(this).toggleclass("m_6"); $(this).toggleclass("m_bg"); }); $(".m_7").click(function() { $(this).next("div.dropdown_menu").slidetoggle('slow'); $(this).toggleclass("m_7"); $(this).toggleclass("m_bg"); }); $(".m_8").click(function() { $(this).next("div.dropdown_menu").slidetoggle('slow'); $(this).toggleclass("m_8"); $(this).toggleclass("m_bg"); }); $(".m_9").click(function() { $(this).next("div.dropdown_menu").slidetoggle('slow'); $(this).toggleclass("m_9"); $(this).toggleclass("m_bg"); }); $(".m_10").click(function() { $(this).next("div.dropdown_menu").slidetoggle('slow'); $(this).toggleclass("m_10"); $(this).toggleclass("m_bg"); }); $(".m_11").click(function() { $(this).next("div.dropdown_menu").slidetoggle('slow'); $(this).toggleclass("m_11"); $(this).toggleclass("m_bg"); }); }) //首页导航 滚动后 $(document).ready(function(){ $(document).scroll(function(){ var pc_menu = $(document).scrolltop(); var headerh= $(".navbar").height(); if(pc_menu >= headerh){ console.log(pc_menu,headerh); $(".pc_menu").addclass("pc_fixed"); }else{ $(".pc_menu").removeclass("pc_fixed"); } }) $(".openlist").click(function(e){ $(".m_menu_list").addclass("m_open_list"); e = e||event; stopfunc(e); }) $(".menu_list_close").click(function(e){ $(".m_menu_list").removeclass("m_open_list"); e = e||event; stopfunc(e); }) $(document).click( function(e){ $(".m_menu_list").removeclass("m_open_list"); }) function stopfunc(e){ e.stoppropagation?e.stoppropagation():e.cancelbubble = true; } }) //首页banner var myswiper = new swiper('.part_one .swiper-container', { autoplay: true, //可选选项,自动滑动 loop : true, autoplay: { delay: 2000, //7秒切换一次 }, pagination :{ el: '.swiper-pagination', clickable :true, }, navigation: { nextel: '.swiper-button-next', prevel: '.swiper-button-prev', }, }) $(document).ready(function() { var owl = $('#index03-lbt'); var item_count = parseint(owl.find('.item').length); if( item_count <= 1){ owl.owlcarousel({ loop: false, nav: true, margin: 20, paginationnumbers:true, responsiveclass: true, autoplay: true, autoplaytimeout: 2000, autoplayhoverpause: true, responsive: { 0: { items: 1, margin: 30, }, 580: { items: 2, margin: 20, }, 760: { items: 2, margin: 25, }, 960: { items: 2, margin: 30, }, 1200: { items: 3, margin: 20, }, 1400: { items: 3, margin: 25, }, 1500: { items: 3, margin: 30, } } }) }else{ owl.owlcarousel({ nav: true, loop: true, paginationnumbers:true, responsiveclass: true, autoplay: true, autoplaytimeout: 2000, autoplayhoverpause: true, responsive: { 0: { items: 1, margin: 30, }, 580: { items: 2, margin: 20, }, 760: { items: 2, margin: 25, }, 960: { items: 2, margin: 30, }, 1200: { items: 3, margin: 20, }, 1400: { items: 3, margin: 25, }, 1500: { items: 3, margin: 30, } } }) } }) // 产品 $(function(){ $(".pro-nav ul>li span").click(function() { $(this).next().next("ol").slidetoggle('slow'); }); })