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
}
});
4100 次
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 に答える