I have read almost all the threads regarding to the bootstrap carousel, but haven\'t found an answer to my question. I have added two control buttons (play/pause) to the car
This was my approach. You can style the .pause and .play class however you see fit, but I'm just using plain text for demo purposes:
$('.carousel-control.pause').click(function() {
var controls = $(this);
if (controls.hasClass('pause')) {
controls.text('Resume').removeClass('pause').toggleClass('play');
$('#myCarousel').carousel('pause');
} else {
controls.text('Pause').removeClass('play').toggleClass('pause');
$('#myCarousel').carousel('cycle');
}
});
Here is your detonator
Pause