// 移动端 点击出现 $('.wy_Cate').on('click', function () { // 按钮隐藏 $(this).css({ 'opacity': 0 }, 500) // 内容滑出 $('.wy_CateList').animate({ "left": 0 }, 500) }) // 移动端 点击收回 $('.wy_backBtn').on('click', function () { // 按钮显示 $('.wy_Cate').css({ 'opacity': 1 }, 500) // 内容收回 $('.wy_CateList').animate({ "left": "100%" }, 500) }) /*分类高亮*/ $(function() { var pathName = window.location.pathname; // 获得路径信息 var subUrl = pathName.substring(pathName.lastIndexOf("/")); $(".s_button3").each(function() { // 遍历a链接的路径 var aLinkUrl = $(this).attr("href"); // 得到a链接的路径 if (aLinkUrl == pathName) { $(this).addClass("wy_Click"); return; }; }); }); /*end*/ /*首页新闻*/ new Swiper('#home_procate', { // 自动轮播 autoplay: 3000, // 循环 loop: true, // 轮播速度 speed: 700, // 一屏幕显示个数 slidesPerView:3, // slide 之间的距离 //spaceBetween: 20, // 媒体查询 breakpoints: { 468: { slidesPerView: 1, }, 768: { slidesPerView: 2, }, 1024: { slidesPerView: 3, }, }, //pagination : '.news_page', //paginationClickable :true, prevButton:'.pro_left', nextButton:'.pro_right', observer:true, observeParents:true, }); /*首页新品*/ new Swiper('#new_product', { // 自动轮播 autoplay: 3000, // 循环 //loop: true, // 轮播速度 speed: 700, // 一屏幕显示个数 //slidesPerView:3, // slide 之间的距离 //spaceBetween: 20, pagination : '.newProduct_page', paginationClickable :true, observer:true, observeParents:true, }); /*首页定制产品*/ new Swiper('#dz_product', { // 自动轮播 autoplay: 3000, // 循环 //loop: true, // 轮播速度 speed: 700, // 一屏幕显示个数 //slidesPerView:3, // slide 之间的距离 //spaceBetween: 20, pagination : '.dzProduct_page', paginationClickable :true, observer:true, observeParents:true, }); /*首页案例*/ $(function(){ $("#c_static_001-16466456172450 .e_loop-14 .p_loopitem").eq(0).show().siblings().hide(); $("#c_static_001-16466456172450 .e_loop-12 .p_loopitem").eq(0).addClass("wy_Active").siblings().removeClass("wy_Active"); $("#c_static_001-16466456172450 .e_loop-12 .p_loopitem").on('click',function(){ var i=$(this).index(); $(this).addClass("wy_Active").siblings().removeClass("wy_Active"); $("#c_static_001-16466456172450 .e_loop-14 .p_loopitem").eq(i).show().siblings().hide(); }); }); /*end*/ new WOW().init(); /*产品分类*/ // 三级显示 // 获取 屏幕宽度 var domWith = $(document).width(); if (domWith > 768) { $('.ejLi').hover(function () { // 图标 转向 $(this).find('.sjBox').show(); }, function () { // 图标复原 $(this).find('.sjBox').hide(); }) } $('.iconfont1').on('click', function () { // 自身的 图标旋转180度 , // 同级的 图标恢复原样 , 二级 收起; // 自身的 二级展开 $(this).toggleClass('rotate').parents('li').siblings('li').find('.ejBox').slideUp().end().find('.iconfont1').removeClass('rotate').end().end().find('.ejBox').stop().slideToggle(); }); $('.iconfont2').on('click', function () { // 自身 三级下拉 ,其它的隐藏 $(this).toggleClass('jsDeg').parents('.ejLi').find('.sjBox').slideToggle().end() .siblings('.ejLi').find('.sjBox').slideUp().end().find('.iconfont2').removeClass('jsDeg'); })