可以在after加上以下的代碼就可以了
[javascript]
$(function() {
$('#slideshow').cycle({
fx: 'scrollHorz',
timeout: 2000,
prev: '#prev',
next: '#next',
pager: '#nav',
after: onAfter
});
});function onAfter(curr,next,opts) {
var caption = 'Image ' + (opts.currSlide + 1) + ' of ' + opts.slideCount;
$('#counter').html(caption);
}
[/javascript]