How to make Bootstrap Carousel to start from the first slide on button click?

3.5k views Asked by At

I am using a Bootstrap Carousel in my website and want to achieve this: The carousel should reset and start from the first slide on button click. Is it possible?

1

There are 1 answers

0
Maxime Willinger On BEST ANSWER
$('#yourButton').click(function() {
   $('.carousel').carousel(0); 
});    

Bootstrap documentation : .carousel(number)