‹‹ cycle homejQuery Cycle Plugin - 'updateActivePagerLink' Demo

// redefine Cycle's updateActivePagerLink function
$.fn.cycle.updateActivePagerLink = function(pager, currSlideIndex) {
    $(pager).find('li').removeClass('activeLI')
        .filter('li:eq('+currSlideIndex+')').addClass('activeLI');
};
        
$('#slideshow').cycle({
    timeout: 3000,
    pager:  '#nav',
    pagerAnchorBuilder: function(idx, slide) {
        return '<li><a href="#"><img src="' + slide.src + '" width="50" height="50" /></a></li>';
    }
});
#nav li.activeLI { background: #ff8 }
代码整理:代码库 来源:cycle插件官网