锘?(function () { //棣栭〉banner鍙互甯﹁棰戞晥鏋 $(window).resize(); var mySwiper = new Swiper('.banner .swiper-container',{ pagination : '.banner .swiper-pagination', grabCursor: true, paginationClickable: true, prevButton:'.banner .swiper-button-prev', nextButton:'.banner .swiper-button-next', autoplay:5000, speed:1000, loop: false, autoplayDisableOnInteraction : false, onInit: function(swiper){ swiperAnimateCache(swiper); swiperAnimate(swiper); }, onSlideChangeEnd: function(swiper){ swiperAnimate(swiper); var _this = $('.banner .swiper-slide').eq(swiper.activeIndex); //if($(window).width()>767){ videoSelect(_this); //} } }) if($("html").hasClass("lt10")){ var test2 = setInterval(function () { mySwiper.slideNext(); }, 15000); $(".banner").hover(function(){ clearInterval(test2); },function(){ test2 = setInterval(function () { mySwiper.slideNext(); }, 5000); }) } //if($(window).width()>767){ videoSelect($('.banner .swiper-slide.swiper-slide-active')); //} function videoSelect(_this){ var flag = true; var cc = _this.hasClass('ban_video'); if(cc){ mySwiper.stopAutoplay(); var videos = ''; _this.append(videos); var aaa = setInterval(function(){ if(!isNaN($(".vv").get(0).duration)&&flag){ clearInterval(aaa); flag=false; setTimeout(function(){ _this.find('video').css("display","block"); },500) } },10); _this.find('video').bind('ended',function () { mySwiper.slideNext(); mySwiper.startAutoplay(); }); }else{ $('.vv').remove(); } } //棣栭〉banner end })