I want a jCarouselLite gallery to act as scrolling thumbnails and present a larger image next to it by somehow refering to it's currently displayed images (then selecting the first image through an array or similar). How would I approach this?
The current setup -
$('.carousel').jCarouselLite({
btnNext: '.next',
btnPrev: '.previous',
auto: true,
timeout: 500,
speed: 500,
vertical: true,
visible: 3,
circular: true,
beforeStart: function(a) {
//alert("Before animation starts:" + a);
},
afterEnd: function(a) {
//fetch first image of the currently displayed images
//set html content of .display div to be that of the new image
}
});
views:
29answers:
1
A:
This might help - http://stackoverflow.com/questions/3557870/showing-the-position-in-jcarousellite
You can use the built in afterEnd and beforeStart functions to show you what's currently being displayed to the user.
$(".ccvi-carousel").jCarouselLite({
btnNext: ".next",
btnPrev: ".prev",
speed: 800,
//auto: 2000,
afterEnd: function(a) {
//look into the object and find the IDs of the list items
left = $(a[0]).attr("id");
mid = $(a[1]).attr("id");
right = $(a[2]).attr("id");
//Do something
$('li#' + left + ' .cf-img').fadeIn();
//alert("Left:" + left + "Middle:" + mid + "Right:" + right + "");
}
});
hfidgen
2010-08-24 17:07:57