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

ellipsis page numbers #3

Open
joelbrennan0 opened this issue Mar 26, 2018 · 2 comments
Open

ellipsis page numbers #3

joelbrennan0 opened this issue Mar 26, 2018 · 2 comments
Labels
feature-request Feature request

Comments

@joelbrennan0
Copy link

joelbrennan0 commented Mar 26, 2018

Hi.

I have a set of results paginated to over 100 pages. Is there any way to format the navigation to say something like:

<< < 1 2 3 ... 98 99 100 > >>

Apologies if this is in the documentation, I couldn't seem to find it.

Thanks

For the time being I'm just doing this:
pageCount = $('.page-navigation a').length; if (pageCount > 20) { $('.page-navigation a').hide(); $('.page-navigation a').slice(0, 5).show(); $('.page-navigation a').eq(5).after('...'); $('.page-navigation a').slice(pageCount - 5, pageCount).show();

    $('.page-navigation a').click(function () {
        $('.page-navigation a').hide();
        $('.page-navigation a').slice(0, 2).show();
        $('.page-navigation a').slice(pageCount - 2, pageCount).show();
        $('.page-navigation a[data-selected="true"]').prev().show();
        $('.page-navigation a[data-selected="true"]').show();
        $('.page-navigation a[data-selected="true"]').next().show();
    });
}`
@Dolu-
Copy link

Dolu- commented Mar 26, 2018

Hello,
You could take a look at this comment : #1 (comment)
I think it will answer your question.

@wikiti
Copy link
Owner

wikiti commented Mar 31, 2018

@joelbrennan0 Hey!

I though that GitHub would automatically notify me on my own repositories; looks like I was wrong. As stated by #1, that hack may solve your issue.

However, after 2 issues, I will consider adding a new feature to this library.

Best regards,
Daniel

@wikiti wikiti added the feature-request Feature request label Mar 31, 2018
@wikiti wikiti self-assigned this Mar 31, 2018
@wikiti wikiti removed their assignment Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Feature request
Projects
None yet
Development

No branches or pull requests

3 participants