Changes on wrapper width only take effect after loading chrome's inspector

Changes on wrapper width only take effect after loading chrome's inspector

miwelillomiwelillo Posts: 3Questions: 0Answers: 0
edited December 2013 in General
I have found a very odd behaviour after setting wrapper's width. I have the following code:

[code]
var winH = screen.availHeight;
var offsetY = $(window).offset.top;
winH = winH - (winH/2) - 50;
winH = winH + "px";

winW = screen.availWidth;
winW = winW - 100;
winW = winW + "px";

var oTable = $('#tutorial-table').dataTable({
"bFilter": false,
"bSort": false,
"bPaginate": false,
"bScrollCollapse": true,
"bInfo": true,
//"sScrollY": "400px",
"sScrollY": winH,
"bAutoWidth": false,
"sScrollX": "100%",
//"sScrollX": winW
});
new FixedColumns( oTable, {
"iLeftColumns": 1,
"iLeftWidth": 130,
});

$('#tutorial-table_wrapper').css('width', winW);
oTable.fnDraw();
[/code]

And table looks very small (it only displays one column) BUT after opening Chrome's/Firefox/Internet explorer's inspector, it resizes to the correct size.

Why does this happen? is there any way to force this behaviour without opening the inspector?
This discussion has been closed.