Multiple Datatables in one page - Third table's styles are not the same.
Multiple Datatables in one page - Third table's styles are not the same.
Hi, I've got a page that is initializing Datatables three times. Every table functions as it ought to. The sorting and search feature works fine. For some reason though, the pagination buttons are displaying completely differently than the first two tables.
I've triple checked things... Nothing is coming to me.
Please note, the plugin is working correctly. classes are in place and everything functions. It just is not displaying the pagination buttons correctly.
Here are two attachments...
http://redapplefalls.net/datatables/tables_1_2.PNG - these are the first two tables which look perfect.
http://redapplefalls.net/datatables/table_3.PNG - this is the third table which looks borked.
Here is my code for initializing the three tables:
$(document).ready(function() {
$('#gridTableKWOne').dataTable({
"bStateSave": true,
"aLengthMenu": [[25, 100, 200, 500], [25, 100, 200, 500]],
"iDisplayLength": 25,
"sPaginationType": "full_numbers",
"sDom": '<"pagination-wrap"p><"tools-filter"f>t<"lbl-total-records"i><"lbl-per-page"l><"pagination-wrap btm"p>',
"aoColumns": [
{ "bSortable": false },
{ "bSortable": false },
null,
null,
null,
null,
null,
null,
null,
null,
null,
]
});
$('#gridTableKWTwo').dataTable({
"bStateSave": true,
"aLengthMenu": [[10, 25, -1], [10, 25, "All"]],
"iDisplayLength": 10,
"sPaginationType": "full_numbers",
"sDom": '<"pagination-wrap"p><"tools-filter"f>t<"lbl-total-records"i><"lbl-per-page"l><"pagination-wrap btm"p>',
"aoColumns": [
{ "bSortable": false },
{ "bSortable": false },
null,
null,
null,
null,
null,
null,
null,
null,
null,
]
});
$('#gridTableKWThree').dataTable({
"bStateSave": true,
"aLengthMenu": [[10, 25, -1], [10, 25, "All"]],
"iDisplayLength": 10,
"sDom": '<"pagination-wrap"p><"tools-filter"f>t<"lbl-total-records"i><"lbl-per-page"l><"pagination-wrap btm"p>',
"aoColumns": [
{ "bSortable": false },
{ "bSortable": false },
null,
null,
null
]
});
});
This question has an accepted answers - jump to answer
Answers
Don't you want "sPaginationType": "full_numbers" for table three?
wah wah. fresh eyes. That fixed it. thanks.