I'm using the Owl Carousel on my site. According to their documentation, this piece of JavaScript should work:
<script>
$("#intro").owlCarousel({
// Most important owl features
//Autoplay
autoPlay : 5000,
stopOnHover : false
)}
</script>
But for some reason it will not autoplay. Here is the HTML of the slider:
<div id="intro" class="owl-carousel">
<div class="item first">
<div class="container">
<div class="row">
<div class="carousel-caption-left colour-white">
<h2>Title Text</h2>
<h1>Sub title text here.</h1>
<p>If you like you can even add a sentence or two here.</p>
</div>
</div>
</div>
<div class="overlay-bg"></div>
</div>
<div class="item second">
<div class="container">
<div class="carousel-caption-left colour-white">
<h2>Title Text</h2>
<h1>Sub title text here.</h1>
<p>If you like you can even add a sentence or two here.</p>
</div>
</div>
<div class="overlay-bg"></div>
</div>
<div class="item third">
<div class="container">
<div class="carousel-caption-left colour-white">
<h2>Title Text</h2>
<h1>Sub title text here.</h1>
<p>If you like you can even add a sentence or two here.</p>
</div>
</div>
<div class="overlay-bg"></div>
</div>
</div>
First, you need to call the owl.autoplay.js.
this code works for me : owl.trigger('play.owl.autoplay',[1000]);
You are may be on the wrong owl's doc version.
Yes, its a typing error.
Write
not
The autoplay-plugin code defines the variable as "autoPlay".
Your Javascript should be
Changing autoplay to autoPlay alone did not work for me. What did the trick was to add autoplaySpeed and autoplayTimeout properties and set them to the same value, like this:
Here's a working demo: JS Bin
More info about this can be found here: https://github.com/smashingboxes/OwlCarousel2/issues/234
Just a Typing Error,
It should be-