我想突出显示当前项目,如何获取图像源和当前缩略图? http://jsfiddle.net/RL8MV/2/
$('#carousel span').append('<img src="http://coolcarousels.frebsite.nl/c/28/img/gui/carousel_glare.png" class="glare" />');
$('#thumbs a').append('<img src="http://coolcarousels.frebsite.nl/c/28/img/gui/carousel_glare_small.png" class="glare" />');
$('#carousel').carouFredSel({
responsive: true,
circular: false,
auto: true,
items: {
visible: 1,
width: 200,
height: '56%'
},
scroll: {
fx: 'directscroll'
}
});
$('#thumbs').carouFredSel({
responsive: true,
circular: true,
infinite: true,
auto: {
play:true
},
scroll:
{
items: 1,
onBefore: function() {
var pos = $("#thumbs").triggerHandler("currentPosition");
// alert( "The carousel is at item number " + pos );
}
},
prev: '#prev',
next: '#next',
items: {
visible: {
min: 2,
max: 6
},
width: 150,
height: '66%'
}
});
$('#thumbs a').click(function() {
$('#carousel').trigger('slideTo', '#' + this.href.split('#').pop() );
$('#thumbs a').removeClass('selected');
$(this).addClass('selected');
return false;
});