dataTables assigning a css class to the pagination wrapper
css, datatables, javascript, jquery, twitter-bootstrap
Solution
You can use `drawCallback` option:
$(document).ready(function () {
$('#myDataTable').DataTable({
...
"drawCallback": function () {
$('.dataTables_paginate > .pagination').addClass('pagination-sm');
}
});
});
Problem
I have a dataTable with it most basic initialization code. But, I need to assign a custom pagination css class to the pagination which appears at the bottom of the table (i want to assign Twitter bootstrap pagination class). How should I do this? Here is my code: ``` $(document).ready(function() { /* Build the DataTable with third column using our custom sort functions */ $('#list_table').dataTable({"sPaginationType" : 'full_numbers', 'sPaging' : 'pagination'}); } ); ```