DataTable pagination with Bootstrap v4.0.0-alpha.2
DataTable pagination with Bootstrap v4.0.0-alpha.2
arunkumar90
Posts: 4Questions: 3Answers: 0
Hi i am using data tables with Bootstrap v4.0.0-alpha.2 version in latest version bootstrap pagination class have changed to
<ul class="pagination">
<li class="page-item">
<a class="page-link" href="#" aria-label="Previous">
<span aria-hidden="true">«</span>
<span class="sr-only">Previous</span>
</a>
</li>
<li class="page-item"><a class="page-link" href="#">1</a></li>
<li class="page-item"><a class="page-link" href="#">2</a></li>
</ul>
Looks like
<ul class="pagination">
<li class="page-item">
<a class="page-link" href="#" aria-label="Previous">
<span aria-hidden="true">«</span>
<span class="sr-only">Previous</span>
</a>
</li>
<li class="page-item"><a class="page-link" href="#">1</a></li>
<li class="page-item"><a class="page-link" href="#">2</a></li>
</ul>
how can override current data table behavior to to make it work normally with newer version?
fixed in javascript
$('ul.pagination li').addClass('page-item');
$('ul.pagination li a').addClass('page-link').
is this right approach ?
Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.
This discussion has been closed.
Answers
For the moment yes, that probably is the correct approach.
I'll look into addressing Bootstrap 4 compatibility for the next release of DataTables.
Allan