Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make navigation alphabet increment #1

Open
mlgiarra opened this issue Sep 28, 2011 · 0 comments
Open

How to make navigation alphabet increment #1

mlgiarra opened this issue Sep 28, 2011 · 0 comments

Comments

@mlgiarra
Copy link

$('.example-3').flexipage({
pager : false,
navigation : true
});

Example-3 is great, but I need alphabet instead of numbers. Can code be added to increment by letter?

//if navigation is set to true
if (opts.navigation == true) {
var navigationHTML = "";
var actual;

    for (var i = 1; i <= opts.total_pages; i++){
      (opts.firstpage == i)? actual = ' class="active" ' : actual = '';
      navigationHTML += '<li'+actual+'><a rel="'+i+'" href="#">'+i+'</a></li>';
    };

    $letter = "a";
    for (var navigationHTML = $letter; $letter++;){  ...whatever   

    buildPager($target, navigationHTML)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant