开发者

jQuery cycle page with links

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜