How to change pager text in jquery cycle plugin


/ Published in: JavaScript
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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. });

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.