I am using Bootstrap and Bootstrap Carousel in a project.
I would like to know if there is a way to get Carousel to go to a specific slide.For example, something like:
$('myCarousel').to(2);
Does anyone know a way to do this?
From the documentation:
. carousel (number) A carousel loop to a specific frame (based on 0, like an array).
Therefore, I think it should be:
$('myCarousel').carousel(2);
Select your carousel item using jQuery and use the method .carousel():
.carousel()
$("#myCarousel").carousel(2);
This will lead you to the third slide.