0

我希望 jCarouselLite 画廊充当滚动缩略图,并通过以某种方式引用它当前显示的图像(然后通过数组或类似方式选择第一张图像)在其旁边呈现更大的图像。我将如何处理这个?

当前设置 -

$('.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
}
});

4

1 回答 1

0

这可能会有所帮助 -在 jCarouselLite 中显示位置

您可以使用内置的 afterEnd 和 beforeStart 函数向您展示当前正在向用户显示的内容。

$(".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 + "");
    }
});
于 2010-08-24T17:07:57.260 回答