I am currently facing an issue with the default bootstrap carousel. One of my slides has a white background, causing the carousel indicators to disappear on that specific slide. Although I have a Javascript/jQuery solution in place, it appears to be slightly slow and clunky. I would greatly appreciate any assistance in improving the script or finding an alternative solution.
$('#carousel-generic').on('slid.bs.carousel', function (evt) {
var elem = $(this).find('.carousel-indicators li');
var active = $(this).find('.carousel-indicators .active');
if(active.index() == 2) {
elem.css('border-color', 'grey');
elem.css('background-color', 'rgba(0,0,0,0)');
active.css('background-color', 'grey');
} else {
elem.css('border-color', 'white');
elem.css('background-color', 'rgba(0,0,0,0)');
active.css('background-color', 'white');
}
})