Topic: Using pagination with cards?
mattaparity free asked 6 years ago
I've reviewed a lot of the code examples but didn't see anything on this site or on the web that demonstrated how one might use pagination with cards. All pagination examples show static table content (nothing with Jinja or other automated lists). Does someone have an example showing pagination with cards or is this not possible with the existing component? Thanks for your thoughts in advance!
Add comment
djdabe free answered 6 years ago
A little late on this, but maybe it will help someone. I recently did a pen on Codepen using twbspagination on divs. I just used it successfully on card stacks.
- I wrapped each set of three cards in a div with the class "page" and id "pag1 for the first set, and id "page2 for the second set.
- I added the two line pagination css to the style sheet.
- I added the js to a file, and linked it.
- I added the pagination nav found at the bottom of the divs on codepen just before the closeing section tag.
- Almost forgot. In the js file I changed the total pages, and visible pages to 2 since that's all I have right now.
Jakub Strebeyko staff answered 6 years ago
Hi there Matt,
Thanks for contributing to the support board! Let me know whether I understand correctly - you would like an example of cards that are toggled with pagination? I don't think we have an example ready yet, but simple MDB components are mostly CSS-based, therefore flexible, easy to implement and intermingle. This, however, would probably require a little bit of JS-magic, but there's nothing wrong with that, right? ;)
With Best Regards,
Kuba
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
Answered
Specification of the issue
- ForumUser: Free
- Premium support: No
- Technology: General Bootstrap questions
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No
Tags