$(function(){ //无限滚动 //向上滚动 if($("[jom-top-scroll]").length != null){ $("[jom-top-scroll]").each(function() { var $_this = $(this); $(this).parent().height('100%'); $(this).simplyscroll({ orientation: 'vertical', // direction:'backwards', 注释去掉后将缓慢反向滑动 customclass: 'vert', manualmode: 'loop', speed: 1, }) }); } //向下滚动 if($("[jom-bottom-scroll]").length != null){ $("[jom-bottom-scroll]").each(function() { var $_this = $(this); $(this).parent().height('100%'); $(this).simplyscroll({ orientation: 'vertical', direction:'backwards', customclass: 'vert', manualmode: 'loop', speed: 1, }) }); } //向左滚动 if($("[jom-left-scroll]").length != null){ $("[jom-left-scroll]").each(function() { var $_this = $(this); $(this).parent().height('100%'); $(this).simplyscroll({ customclass: 'vert', manualmode: 'loop', speed: 2, }) }); }; /*首页滚动swipoer*/ $require(['swiper'], function () { var honorbox = new swiper ('.honorbox', { speed: 1500, autoplay: true, loop: true, slidesperview :2, spacebetween : 20, watchslidesvisibility: true, centerinsufficientslides: true, autoplaydisableoninteraction : false, navigation: { nextel: '.honorboxbb .swiper-button-next', prevel: '.honorboxbb .swiper-button-prev', }, breakpoints: { 768: { slidesperview :5, spacebetween : 20 } } }); }); /*单个滚动首页滚动swipoer*/ $(function () { var galleryswiper = new swiper('.cnproswiper .swiper-container',{ autoplay: { delay:4500, pauseonmouseenter:true, disableoninteraction: false }, slidesperview: 5, paginationclickable: true, spacebetween: 20, loop: true, loopedslides: 5, pagination:{ el: '.page_box .cn-paginations', type: 'fraction', }, navigation: { nextel: '.page_box .swiper-next', prevel: '.page_box .swiper-prev', }, breakpoints: { //当宽度小于等于768 0: { slidesperview: 1, spacebetween: 20 }, 768: { slidesperview: 2, spacebetween: 20 }, //当宽度小于等于1024 1024: { slidesperview: 3, spacebetween: 20 }, 1400: { slidesperview: 4, spacebetween: 20 } } }) }) /* 循环体a标签选中高亮,多用于分类*/ var url = window.location.pathname + window.location.search; $(".p_list a").each(function () { //判断分类导航里面的rel和url地址是否相等 if ((url).indexof($(this).attr('href')) > -1&&$(this).attr('href')!='') { $(this).addclass('active'); urlstatus = true; } else { $(this).removeclass('active'); } }); /* 分类选中高亮,多用于分类*/ var urlname = window.location.pathname; $('.navlist_a1 .swiper-slide a').each(function(){ var urlhref = $(this).attr('href'); if (urlname.indexof(urlhref)>=0){ $(this).addclass('active'); } }); var windname = window.location.pathname; var time = setinterval(function () { var m = $(".p_loopitem a").attr("href"); if (m) { console.log(m); $(".p_loopitem a").each(function () { var l_m = $(this).attr("href") if (l_m == windname) { $(this).parents('.p_loopitem').addclass("active") } }); clearinterval(time); } }, 100); /*表格手机端页面内滚动条*/ $("#c_introl_detail_005_p_002-1672157907933 .e_richtext-5 table").each(function() { $(this).wrap("
"); }); });