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 \'
I'm doing it like that, that works sort of very well ;)
var slider = $("#slider-wrapper")
.carousel({
interval: 4000
})
.bind('slid', function() {
var index = $(this).find(".active").index();
$(this).find("a").removeClass('pager-active').eq(index).addClass('pager-active');
});
$("#slider-wrapper a").click(function(e){
var index = $(this).index();
slider.carousel(index);
e.preventDefault();
});