window.onscroll = function(){ var t = document.documentElement.scrollTop || document.body.scrollTop; if( t >= 1 ) { $('#c_portalResnav_main-16497306162516404 .yx_Nav1').addClass("headerwx"); } else { $('#c_portalResnav_main-16497306162516404 .yx_Nav1').removeClass("headerwx"); } } //链接替换 //$('#c_effect_047-1673928664204 .e_loop-1 .p_loopitem:eq(0) a').attr('href','/product/39.html'); //tab $(function(){ $("#c_magiccube_009-1690363069039 .top .tab-item").off("click").on("click",function(){ var index = $(this).index(); $(this).addClass("on").siblings().removeClass("xon"); $("#c_magiccube_009-1690363069039 .p_content").eq(index).addClass("xactive").siblings().removeClass("xactive"); }); }); //隐藏显示 $("#c_magiccube_009-1690363069039 .p_tablist").click(function(){ $("#c_magiccube_009-1690363069039 .top-content").toggleClass("zcycbddexl"); }); var windName = window.location.pathname; var time = setInterval(function () { var m = $(".e_text-4 a").attr("href"); if (m) { console.log(m); $(".e_text-4 a").each(function () { var l_m = $(this).attr("href") if (l_m == windName) { $(this).parents('.e_text-4').addClass("active") } }); clearInterval(time); } }, 100); //首页案例列表滚动 $require(['swiper'], function () { var honoRBox = new Swiper('.case', { autoplay: { delay: 2500, // 2.5秒切换一次 }, slidesPerView: 1, spaceBetween: 0, slidesPerGroup: 1, loop: true, loopFillGroupWithBlank: true, pagination: { el: ".casegund", clickable: true, }, breakpoints: { 768: { slidesPerView: 3, spaceBetween: 30 } } }) }) //首页荣誉列表滚动 $require(['swiper'], function () { var honoRBox = new Swiper('.ryzs', { autoplay: { delay: 2500, // 2.5秒切换一次 }, slidesPerView: 2, spaceBetween: 10, slidesPerGroup: 2, loopFillGroupWithBlank: true, pagination: { el: ".ryzsgund", clickable: true, }, breakpoints: { 768: { slidesPerView: 5, slidesPerGroup: 5, spaceBetween: 15 } } }) }) $(document).ready(function() { $('#c_magiccube_009-1690363069039 .p_top').click(function() { $(this).parent().addClass('active'); }); });