Click here to Skip to main content
15,885,435 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello
I have a list in html that I want to page it using jquery. can anyone help me please?

What I have tried:

in my html:
HTML
<ul>
 <li>...</li>
 <li>...</li>
      .
      .
      .
 <li>...</li>
</ul> <!-- End of my List -->

<ul id="Pagination"></ul>


and JS:
JavaScript
  $(function() {
    $("#Pagination").pagination({
        items: 100,
        itemsOnPage: 2,
        cssStyle: 'light-theme'
    });
});


Here is the site that I am have get helped:
Paginatio

but the paging buttons will not page the List and will not affect it. what shoul I do?
Posted
Updated 30-Nov-16 9:38am
Comments
F-ES Sitecore 30-Nov-16 11:45am    
I think that component only provides the page numbers, it doesn't actually do any paging for you. You need to supply an "onPageClick" function which has the selected page as a param and you then need to do the actual paging yourself.
Ali Majed HA 1-Dec-16 3:10am    
Hello but in demoes, The code will affect the list and page it correctly

1 solution

There is sample demo with source code avaiable, which should be enough to get you started, see the demo at following url:

simplePagination[^]

and the source code for it is avaiable on github at following url:

bin/simplepagination at master · bilalakil/bin · GitHub[^]

Hope it help you out. :)

UPDATE:

you can also have a look at following post :

javascript - How to use SimplePagination jquery - Stack Overflow[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900