Bootstrap
Bootstrap
Make dots work externally
$(document).ready(function() {
$('#full-slider-carousel').on('slide.bs.carousel', function (data) {
// remove active class
$('#full-slider .carousel-indicators li').removeClass('active');
// get the target of the main slider
var targetPos = $(data.relatedTarget).index();
// add one
targetPos = targetPos+1;
// apply to the dots
$('#full-slider .carousel-indicators li:nth-child('+ targetPos +')').addClass('active');
// rinse and repeat
});
});
be5dd23a-2d4c-45b2-a6a4-8d7e29d177cc
Created on: 28th October, 2022
Last updated: 28th October, 2022
Tagged With: