SlideShow con cycle plugin jQuery
Home » SlideShow con cycle plugin jQuery
Codice della Lezione: SlideShow con cycle jQuery
$(document).ready(function() {
$('#immagini').cycle({
fx: 'fade',
speed: 1000,
timeout: 3000,
pager: '#thumbs ul',
next: '#next',
prev: '#prev',
before: onBefore,
after: onAfter,
pagerAnchorBuilder: function(idx, slide) {
return '<li><a href="#" title="Thumbnail"><img src="' + slide.src + '"/></a></li>';
}
});
function onBefore() {
$('#testo p').fadeOut('1000');
}
function onAfter() {
$('#testo p').fadeIn('1000');
$('#testo').html('<p>' + this.alt + '</p>');
}
});