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

Solution to the style of the html css pagination #744

Open
oranyero opened this issue Mar 31, 2022 · 2 comments
Open

Solution to the style of the html css pagination #744

oranyero opened this issue Mar 31, 2022 · 2 comments

Comments

@oranyero
Copy link

I spent hours searching how to add my own code and found this solution. I hope it works for someone. :)

options = {
                valueNames: ['id'],
                page: 8,
                pagination: {listClass: 'pagination', item: function(values) {return `<li><a class=''>${values.page}</a></li>`;},}
            };
@EvilDTX91
Copy link

EvilDTX91 commented Apr 1, 2022

Hi!
First of all thank you for the idea!
Sadly this is not worked for me, but i found an easy solution.
Just add a custom CSS class to the element, after you create the list:

var monkeyList = new List('test-list', {
       valueNames: ['name'],
       page: 3,
      pagination: true
     });  
$('li > .page').addClass('page-link');

Give a shot to this if the upper soloution not working for you either, i hope its helped someone with the styling problem.

@grovolis
Copy link

grovolis commented Mar 27, 2024

I spent hours searching how to add my own code and found this solution. I hope it works for someone. :)

options = {
                valueNames: ['id'],
                page: 8,
                pagination: {listClass: 'pagination', item: function(values) {return `<li><a class=''>${values.page}</a></li>`;},}
            };

This worked fine for me, I had to remove the comma between the last two curly brackets though. Also had to add my classes otherwise it looks like the default styling, making you think it's not working.

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

3 participants