I have a page where I'm trying to add several jCarousel elements. One of these on its own works very nicely with the following code:
function mycarousel_initCallback(carousel) {
jQuery('.next').bind('click', function() { carousel.next(); return false; });
jQuery('.prev').bind('click', function() { carousel.prev(); return false; });
};
// Load carousel...
jQuery(document).ready(function() {
jQuery(".featuredItems").jcarousel({
scroll: 4,
visible: 4,
initCallback: mycarousel_initCallback,
buttonNextHTML: null,
buttonPrevHTML: null
});
});
However if I add more than one to a page - the forward/back buttons control all carousels not just the one I want. I've tried messing around with "this" to isolate the carousel element I want to change, but this doesn't seem to work.