出现最后一项时禁用刷卡(idangero.us)

时间:2018-07-22 09:34:11

标签: jquery plugins html-framework-7 swiper idangero

我正在使用iDangero.us swiper插件,并且我想在屏幕上显示最后一个横幅时禁用swiper。 check this link.

Image

var i = myApp.swiper(".mixed-swiper", {
        width: 626,
        spaceBetween: 22,
        slidesPerView: 2,
        freeMode: !1,
        autoplay: !1,
        loop:!1,
        freeModeMomentum: !0,
        freeModeMomentumBounce: !0,
        freeModeMomentumRatio: "1",
        freeModeMomentumVelocityRatio: "0.7",
        freeModeMomentumBounceRatio: "1",
        mousewheelControl: !0,
        mousewheelReleaseOnEdges: !1,
        mousewheelForceToAxis: !0,
        mousewheelInvert: !0,
        grabCursor:!0,
        breakpoints: {
            320: {
                width: 537
            }
        }
})

1 个答案:

答案 0 :(得分:0)

如果要在swiper中使用自动播放功能,则需要在初始化swiper时再添加一个参数

var i = myApp.swiper(".mixed-swiper", {
        width: 626,
        spaceBetween: 22,
        slidesPerView: 2,
        freeMode: !1,
        autoplay: !1,
        loop:!1,
        freeModeMomentum: !0,
        freeModeMomentumBounce: !0,
        freeModeMomentumRatio: "1",
        freeModeMomentumVelocityRatio: "0.7",
        freeModeMomentumBounceRatio: "1",
        mousewheelControl: !0,
        mousewheelReleaseOnEdges: !1,
        mousewheelForceToAxis: !0,
        mousewheelInvert: !0,
        grabCursor:!0,
        stopOnLastSlide:true, // this stop swiper once it reaches last slider
        breakpoints: {
            320: {
                width: 537
            }
        }
})