IE8 + scrollX table + fnAdjustColumnSizing = fire window resize event
IE8 + scrollX table + fnAdjustColumnSizing = fire window resize event
![bpelhos](https://secure.gravatar.com/avatar/39a530032448b1a694085b935ec180a9/?default=https%3A%2F%2Fvanillicon.com%2F39a530032448b1a694085b935ec180a9_200.png&rating=g&size=120)
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.