Using the twitter bootstrap framework, how is it possible to invoke the carousel to \'auto slide.\' Meaning when the page loads, the carousel automatically scrolls.
I ha
Simply add the class "slide" to the carousel div tag, like this:
<div class="carousel slide" id="this-carousel-id">
For Bootstrap 4 and onwards:
$(function(){
$('.carousel').carousel({
interval: 2000,
ride: 'carousel' // this is the important part
});
});
<div id="myCarousel" class="carousel slide" data-ride="carousel">
works for me, what I have been missing was the data-ride attribute.
I hope this will help a lot of people. Thank you stackoverflow, you have been very useful to me on most grounds. Am glad this community exists.
Just add data-interval="5000"
to the div
with the IP carouselExampleIndicators
.
Like this:
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel" data-interval="5000">