Posted By

i-am-andy on 11/23/11


Tagged

jquery pagination cycle


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

jbyerson


How to change pager text in jquery cycle plugin


 / Published in: JavaScript
 

URL: http://stackoverflow.com/questions/3704269/how-to-change-pager-text-in-jquery-cycle

Change the text of the jquery cycle pager element. By default is is 1, 2, 3 etc but you can change this to text via a variable

  1. $(document).ready(function () {
  2. var titles = ['Pentiction Summer Classic', 'Ryan Kesler', 'Trevor Linden'];
  3. $('.slideshow').cycle({
  4. fx: 'fade',
  5. timeout: 5000,
  6. pager: '#nav',
  7. pagerAnchorBuilder: function (index) {
  8. return '<a href="#">' + titles[index] + '</a>';
  9. }
  10. });
  11. });

Report this snippet  

You need to login to post a comment.