> This question has been asked several times in various places online,
> but the solution that's usually given isn't working for me.
>
> I want to show the slide titles (rather than just numbers) in the
> pager, so am calling it like this:
>
> jQuery(document).ready(function() {
>         jQuery('#cycle-pics').cycle({
>                 speed:1000,
>                 timeout:3000,
>                 next:'#next',
>                 prev:'#prev',
>                 pager:'#cycle-numbers',
>                 pagerAnchorBuilder: function(idx, slide) {
>                         return '<a href="#">'+(idx+1)+' '+ slide.title 
> +'</a>';
>                 }
>         });
> });
>
> The pagerAnchorBuilder function is correctly showing the slide
> numbers, but not the titles.


Try this:

pagerAnchorBuilder: function(idx, slide) {
    var txt = '' + (idx+1) + ' ' + $(slide).attr('title');
    return '<a href="#">'+ text +'</a>';
}

Reply via email to