$(function() { $require(['swiper'], function() { var s1_swiper = new swiper('.swiper1 .swiper-container', { direction: 'vertical', autoplay: false, slidesperview: 6, // loop:true, spacebetween: 6, slidetoclickedslide: true, breakpoints: { 768: { //当屏幕宽度大于等于768 spacebetween: 12 }, } }); var s2_swiper = new swiper('.swiper2 .swiper-container', { autoplay: false, }); $('.swiper1 .swiper-slide:first-child').addclass('active'); $('.swiper1 .swiper-slide').click(function() { var index = $(this).index(); $(this).addclass('active').siblings().removeclass('active'); s2_swiper.slideto(index); }); }) var str1 = $('.n').text().trim(); if(!str1){ $('.ctn3 .con .ctn-list .n').hide(); } var str3=str1.replace(/\s+/g, " "); var str2 = $('.n-hide').text().trim(); var str4=str2.replace(/\s+/g, " "); var html1 = ''; str1 = str3.split(' '); str2 = str4.split(' '); $.each(str1, function(i, v) { if (v == '/' || v == '-' || v == '(' || v == ')') { html1 += '' + v + ''; }else if(v.indexof('[')!==-1){ v=v.substring(1,v.indexof(']')); html1+=''+v+''; } else { html1 += '