0

I am trying to implement pagination for cards using bootstrap 5, I am following here.. https://getbootstrap.com/docs/5.0/components/pagination/

I can only find the UI, but I don't see any proper implementation using real data, Is there any proper implementation available? (with features like page-length, search etc)

1 Answer 1

2

Bootstrap 5 is generally running without jQuery, even tho you can add it again. But you don't need to have jQuery (like it was with Bootstrap 4).

See https://getbootstrap.com/docs/5.0/getting-started/javascript/

Bootstrap 5 is designed to be used without jQuery, but it’s still possible to use our components with jQuery.

Regarding your question:

There is no need for any javascript at all for using the pagination component. To make it more clear i inserted https://www.example.org/ as link hrefs into the dummy code, just insert your links there.

See https://getbootstrap.com/docs/5.0/components/pagination/#overview

Just insert proper link hrefs in the example code where the # is written.

<nav aria-label="Page navigation example">
  <ul class="pagination">
    <li class="page-item"><a class="page-link" href="https://www.example.org/">Previous</a></li>
    <li class="page-item"><a class="page-link" href="https://www.example.org/">1</a></li>
    <li class="page-item"><a class="page-link" href="https://www.example.org/">2</a></li>
    <li class="page-item"><a class="page-link" href="https://www.example.org/">3</a></li>
    <li class="page-item"><a class="page-link" href="https://www.example.org/">Next</a></li>
  </ul>
</nav>

If youre searching for an actual logical implementation which makes your data actually be paged thats not included in bootstrap at all. Bootstrap just provides the GUI not the server sided logic youll need to make data actually paginate.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.