I am using the cycle plugin with pager functionality like this :
$j('#homebox')
.cycle({
fx: 'fade',
speed: 'fast',
timeout: 9000,
pager: '#home-thumbs',
pagerEvent: 'mouseover',
pagerAnchorBuilder: function(idx, slide) {
开发者_运维知识库 // return sel string for existing anchor
return '#home-thumbs li:eq(' + (idx) + ') a';
}
});
I was wondering how I could also add an onclick function where if the thumbs were clicked they would take you to the appropriate url. The code comes from here:
http://www.malsup.com/jquery/cycle/pager3.html
I figured it out by adding an onclick event directly to each of the thumbs.
精彩评论