anythingslider

How do I set custom text for the navigation buttons in Jquery anythingslider?


I have recently started using Jquery anythingslider and I'm loving it till now.

I just wanted whether it is possible to change the default text which appears on the navigation buttons (1,2 etc..) to some custom text.

Thanks.


Solution

  • Use the navigationFormatter option:

    $('#slider2').anythingSlider({
      // Format navigation labels with text
      navigationFormatter : function(index, panel){
        return ['Recipe', 'Quote', 'Image', 'Quote #2', 'Image #2'][index - 1];
      }
    });