window.onscroll = function(){ var t = document.documentElement.scrollTop || document.body.scrollTop; if( t >= 1 ) { $('#c_static_001-1694657791680').addClass("headerwx"); } else { $('#c_static_001-1694657791680').removeClass("headerwx"); } } //链接替换 //$('#c_effect_047-1673928664204 .e_loop-1 .p_loopitem:eq(0) a').attr('href','/product/39.html'); //tab // $(function(){ // $(".plate_pro .pro_fl span").off("click").on("click",function(){ // var index = $(this).index(); // $(this).addClass("on").siblings().removeClass("on"); // $(".plate_pro .pro_nr .pro_nrw").eq(index).addClass("active").siblings().removeClass("active"); // }); // }); //隐藏显示 $(".yx_TopL").click(function(){ $(".yx_Header").toggleClass("zcycbddexl"); }); $(document).ready(function() { $('img').each(function() { var altText = $(this).attr('alt'); var titleText = $(this).attr('title'); if (altText === '图片名称') { $(this).attr('alt', '大发官方网站'); } if (titleText === '图片名称') { $(this).attr('title', '大发官方网站'); } }); }); var windName = window.location.pathname; var time = setInterval(function () { var m = $("#c_static_001-1694663634468 .e_text-6 a").attr("href"); if (m) { console.log(m); $("#c_static_001-1694663634468 .e_text-6 a").each(function () { var l_m = $(this).attr("href") if (l_m == windName) { $(this).parents('#c_static_001-1694663634468 .e_text-6').addClass("active") } }); clearInterval(time); } }, 100); var windNameb = window.location.pathname; var time = setInterval(function () { var m = $("#c_static_001-1694675781735 .e_text-3 a").attr("href"); if (m) { console.log(m); $("#c_static_001-1694675781735 .e_text-3 a").each(function () { var l_m = $(this).attr("href") if (l_m == windNameb) { $(this).parents('#c_static_001-1694675781735 .e_text-3').addClass("active") } }); clearInterval(time); } }, 100); $require(['swiper'], function () { var honoRBox = new Swiper('.zycplist', { autoplay: { delay: 2500, // 2.5秒切换一次 }, loop: true, // 循环(loop)模式,使用的话取消注释 observer:true, //修改swiper自己或子元素时,自动初始化swiper observeParents:true, //修改swiper的父元素时,自动初始化swiper slidesPerView: 2, spaceBetween: 10, watchSlidesVisibility: true, centerInsufficientSlides: true, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, breakpoints: { 768: { slidesPerView: 5, spaceBetween: 10 } } }) })