简体   繁体   中英

How can i make one slide stays longer than others in owlCarousel

$(".banner-slider").owlCarousel({
    navigation : true, // Show next and prev buttons
    pagination: true,
      slideSpeed : 50000,
      singleItem:true,
      autoPlay: true,
      autoPlay : 6000,
  });

You can use an array of times ` var delays = [4000,3000,5000,3000];

function pageLoad() {
    $(function () {
        $('#slider').nivoSlider({
            pauseTime: 50000,
            directionNav: true,
            afterChange: function () { setDelay() },
            afterLoad: function () { setDelay() },
            controlNav: true,
            pauseOnHover: false
        });
    });
}

function setDelay() {
    var currentSlide = $('#slider').data("nivo:vars").currentSlide;
    setTimeout(function () {
        $('#slider').find('a.nivo-nextNav').click()
    }, delays[currentSlide]);

}`

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM