Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make carousel slide continuously with Owl Carousel

I want to do, that logos with Owl Carousel plugin will slide continuously (no with 1,2,3... seconds delay, but slide without stop) Is it possible with Owl Carousel?

like image 546
Jakub Avatar asked Oct 21 '25 13:10

Jakub


1 Answers

Here is how I got owl carousel to constantly scroll.

I had to add in a trigger to start the loop as the autoplay was too long, and meant it didn't start straight away, then I have a second trigger that sets the speed back to match the main setting.

You need to make sure that autoplaySpeed and smartSpeed are set to the same timing, and that slideTransition is set to linear.

jQuery(document).ready(function() {
    jQuery('.owl-carousel').owlCarousel({
    loop: true,
    items: 6,
    autoplay: true,
    slideTransition: 'linear',
    autoplaySpeed: 6000,
    smartSpeed: 6000,
    center: true,
    });


    jQuery('.owl-carousel').trigger('play.owl.autoplay',[2000]);

    function setSpeed(){
        jQuery('.owl-carousel').trigger('play.owl.autoplay',[6000]);
    }

    setTimeout(setSpeed, 1000);
});
like image 84
Rach Avatar answered Oct 23 '25 04:10

Rach



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!