How to Responsive Datatable

In the modern world of responsive web design tables can often cause a particular problem for designers due to their row based layout. Responsive is an extension for DataTables that resolves that problem by optimising the table’s layout for different screen sizes through the dynamic insertion and removal of columns from the table.

Jquery Code

<link href="datatables-plugins/dataTables.bootstrap.css" rel="stylesheet">

<script src="datatables-plugins/dataTables.bootstrap.min.js"></script>
<script src="datatables-responsive/dataTables.responsive.js"></script>
<script>
$(document).ready(function() {
    $('#dataTables').DataTable({
        responsive: true
    });
});
</script>

Leave a Reply

Your email address will not be published. Required fields are marked *