$(function(){ honorslider(); aboutIndex(); aboutSlider(); }) function honorslider(){ if($(".honor_slider li").length>=1){ $(".honor_slider .honor_but").show(); var brand3Swiper = new Swiper('.honor_slider .swiper-container', { slidesPerView: 1, slidesPerGroup: 1, spaceBetween: 0, prevButton:'.honor_slider .swiper-button-prev', nextButton:'.honor_slider .swiper-button-next', // breakpoints:{ // 767: { // slidesPerView: 1, // slidesPerGroup: 1 // }, // } }) } } function aboutIndex(){ setTimeout(function(){ $(".about_top .right li").eq(0).click(); },200) $(document).on("click",".about_top .right li",function(){ $(this).addClass("on").siblings().removeClass("on"); var url = $(this).data("src"); if(url == ""){ return false; }else{ aboutAjax(".about_bottom",url) } }) } function aboutSlider(){ var num=4; if($(window).width()<=1024){ var num=3; } if($(window).width()<=767){ var num=2; } if($(".about_slider li").length>=1){ var brand3Swiper = new Swiper('.about_slider .swiper-container', { slidesPerView: num, slidesPerGroup: 1, spaceBetween: 80, prevButton:'.about_slider .swiper-button-prev', nextButton:'.about_slider .swiper-button-next', breakpoints:{ 1440: { spaceBetween: 40, }, 1024: { spaceBetween: 40, }, 767: { spaceBetween: 10, }, } }) }else{ $(".about_slider").hide(); } if($(".about_slider li").length>num){ $(".about_slider .honor_but").show(); } } function aboutAjax(str,url){ if (url.indexOf('?') == -1) { url += '?tm=' + Math.random(); } else { url += '&tm=' + Math.random(); } $.ajax({ url:url, success:function(msg){ $(str).html(""); $(str).append(msg); aboutSlider(); tem_tac(); imgratio(); imgratio2(); } }); }