开发者

jQuery cycle page with links

开发者 https://www.devze.com 2022-12-10 18:45 出处:网络
I am using the cycle plugin with pager functionality like this : $j(\'#homebox\') .cycle({ fx:\'fade\',

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

精彩评论

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