I would like to move the Datatables pagination to a custom position. The documentation gives reference to the "dom" option but I dont see that it achieves what I'm looking for.
I want to put the pagination buttons in a card-footer. Is there a relatively clean way to do this via DataTables without writing my own pagination.
<div class="card-footer py-4">
<nav>
<ul class="pagination justify-content-end mb-0">
<li class="page-item disabled">
<a class="page-link" href="#" tabindex="-1">
<i class="fas fa-angle-left"></i>
<span class="sr-only">Previous</span>
</a>
</li>
<li class="page-item active">
<a class="page-link" href="#">1</a>
</li>
<li class="page-item">
<a class="page-link" href="#">2 <span class="sr-only">(current)</span></a>
</li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
<li class="page-item">
<a class="page-link" href="#">
<i class="fas fa-angle-right"></i>
<span class="sr-only">Next</span>
</a>
</li>
</ul>
</nav>
</div>
In a related example I was able to override the default behaviour of the search box by hiding the Datatables box in CSS and ooking up my custom search box to Datatables using the js below. I'm hoping theres a similar method for the above issue.
var dataTable = $('#example-table').dataTable();
$("#searchbox").keyup(function() {
dataTable.fnFilter(this.value);
});
Thanks