Kev
Kev

Reputation: 53

How to change pager text in jquery cycle

I am trying to change the text of the jquery cycle pager element. By default is is 1, 2, 3 etc. I would like to just make a customized name for each one. Here is the url:

http://www.rockymountainsports.ca/web/layout.html

Any help is great, Thanks

Upvotes: 0

Views: 3022

Answers (1)

pepkin88
pepkin88

Reputation: 2756

Try this:

$(document).ready(function () {
    var titles = ['Pentiction Summer Classic', 'Ryan Kesler', 'Trevor Linden'];
    $('.slideshow').after('<div id="navigation"><div id="nav"></div></div>').cycle({
        fx:     'fade', 
        timeout: 5000, 
        pager:  '#nav',
        pagerAnchorBuilder: function (index) {
            return '<a href="#">' + titles[index] + '</a>';
        }
    });
});

Upvotes: 3

Related Questions