I am using a Jquery Datatables table with bPaginate = false and sScrollY is some fixed height. Ultimately I want the table to resize on the window.resize event.
To
Ok what seems to work nicely is to do tap into the elements added by the datatbables framework:
$(window).resize(function() {
console.log($(window).height());
$('.dataTables_scrollBody').css('height', ($(window).height() - 200));
});
$('#example').dataTable({
"sScrollY": ($(window).height() - 200),
"bPaginate": false,
"bJQueryUI": true
});
This example lets the table resize smoothly with the window.
Live example: http://jsbin.com/anegiw/18/edit