$(window).on('load',function(){ var delay; var mySwiper = new Swiper('.i_banner_swiper-container', { direction: 'horizontal', pagination: { el: '.i_banner_swiper-container .i_banner_swiper-pagination', bulletElement: 'span', renderBullet: function (index, className) { return '' + (index + 1) + ''; }, bulletClass: 'pagination_bullet', bulletActiveClass: 'selected', clickable: true }, effect: "fade", speed:1000, // mousewheel: true, // slidesPerView: 1, // spaceBetween: 0, autoplay: { delay: 4500, disableOnInteraction: false, }, // autoHeight: true, loop: true, // on:{ // // init:function(swiper){}, // transitionStart: function(){ // realIndex = this.realIndex; // delay = this.params.autoplay.delay; // $('#wrapper_pager a span').stop().width( 0 ); // $('#wrapper_pager a span').slice( 0, realIndex ).width('100%'); // $("#wrapper_pager a").eq(realIndex).children("span").animate({width:'100%'},delay); // }, // // slideChangeTransitionStart: function(swiper){}, // // transitionEnd: function(){}, // } }); $('body').find("#wrapper_pager a:eq(0) span").animate({width:'100%'},delay); var mySwiper2 = new Swiper('.i_slides-container', { speed:400, pagination: { el: '.i_slides-container .i_slides-pagination', clickable: true // type: "fraction", }, // navigation: { // prevEl: '.i_slides-container .prev', // nextEl: '.i_slides-container .next', // }, slidesPerView: 1, spaceBetween: 0, autoplay: { delay: 4300, disableOnInteraction: false, // pauseOnMouseEnter:true }, loop: true }); // // pauseOnMouseEnter // //6.6.2之前的版本需要通过代码实现此功能 // mySwiper2.el.onmouseover = function(){ // mySwiper2.autoplay.stop(); // } // mySwiper2.el.onmouseout = function(){ // mySwiper2.autoplay.start(); // } // var mySwiper3 = new Swiper('.i_yxqy_slides', { // speed:400, // pagination: { // el: '.i_yxqy_slides .swiper-pagination', // clickable :true, // }, // slidesPerView: 1, // spaceBetween: 20, // speed:1000, // autoplay: { // delay: 65000, // disableOnInteraction: false, // // pauseOnMouseEnter:true // }, // loop: true // }); // var mySwiper4 = new Swiper('.i_jrcs_slides', { // speed:400, // pagination: { // el: '.i_jrcs_slides .swiper-pagination', // clickable :true, // }, // slidesPerView: 1, // spaceBetween: 20, // speed:1000, // autoplay: { // delay: 7000, // disableOnInteraction: false, // // pauseOnMouseEnter:true // }, // loop: true // }); });