IE8 + scrollX table + fnAdjustColumnSizing = fire window resize event
IE8 + scrollX table + fnAdjustColumnSizing = fire window resize event
bpelhos
Posts: 3Questions: 0Answers: 0
Please be careful when using the window.resize event to reformat your table on browser window resize. On IE8 fnAdjustColumnSizing() fires the window.resize event and so it starts a never-ending loop.
[code]
oTable = $('#dataTables').dataTable({
"sScrollX": "100%",
"bSort": false,
"bAutoWidth": false,
"bFilter": false,
"bInfo": false,
"bLengthChange": false,
"bPaginate": false,
} );
$(window).bind('resize', function () {
oTable.fnAdjustColumnSizing();
}
[/code]
Of course the "sScrollX": "100%" setting means that you don't need to adjust the table on window resize, fnAdjustColumnSizing doesn't change anything on the table.
[code]
oTable = $('#dataTables').dataTable({
"sScrollX": "100%",
"bSort": false,
"bAutoWidth": false,
"bFilter": false,
"bInfo": false,
"bLengthChange": false,
"bPaginate": false,
} );
$(window).bind('resize', function () {
oTable.fnAdjustColumnSizing();
}
[/code]
Of course the "sScrollX": "100%" setting means that you don't need to adjust the table on window resize, fnAdjustColumnSizing doesn't change anything on the table.
This discussion has been closed.