How do I get the current index from the carousel?
In this case I am using an unordered list. I know I could search through the list items to find the one with the \'
Instead of adding and subtracting from the current slide, try this on the 'slide' event:
$('.carousel').on('slide',function(e){ var slideFrom = $(this).find('.active').index(); var slideTo = $(e.relatedTarget).index(); console.log(slideFrom+' => '+slideTo); });