my carousel has both external control and next/prev arrows. i would like to be able to add a class to the external control that corresponds with the visible li.
this is how i'm building my navigation links: // build links $('.carousel ol').each(function(i){ var carouselNavDivs = $('ul.nav-carousel'); $(carouselNavDivs[i]).append('<li> # previous </li>'); $(this).children().each(function(j){ var linkNum = 0; linkNum = j+1; $(carouselNavDivs[i]).append('<li> # '+linkNum+' <li>'); }); $(carouselNavDivs[i]).append('<li> # next </li>'); }); } user has an option to scroll via next/prev or to click linkNum and go directly to corresponding panel. i would still like this functionality but would like to indicate which linkNum is currently active. i can add class acitve onclick by modifying this bit of code in carousellite.js: if (o.btnGo) $.each(o.btnGo, function(i, val) { $(val).click(function() { $(this).addClass('active'); return go(o.circular ? o.visible + i : i); }); }); but that only adds class when i click on linkNum. basically creating a navigation similar to pagination...i want to be able to add a visual "this is where you are" cue either when user clicks linkNum or when user clicks prev/next. hope this makes sense...i was not sure how exactly i would word what i was looking for but gave it a shot. attached an image that shows desired results: active class would allow me to target via css and change image http://www.nabble.com/file/p20241511/Picture%2B4.png Picture+4.png thanks -- View this message in context: http://www.nabble.com/jcarousellite%3A-add-class-to-btnGo-external-control-on-click-of-next-or-previous-tp20241511s27240p20241511.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.