$('#Main').bind('resize', function ()
{
$('.datatable').each( function(i)
{
$(this).fnAdjustColumnSizing() ;
}) ;
});
$('#Main').bind('resize', function ()
{
$('.datatable').each( function(i)
{
$(this).dataTable().fnAdjustColumnSizing() ;
}) ;
});
Reasoning - the value of 'this' in the each function will be the value of the array generated by jQuery - i.e. the table nodes. These then need to be 'DataTables-ised' and the function run on them, since the DataTables function aren't attached to the jQuery object, but to DataTables itself.DataTables warning : Unable to re-initialise DataTable. Please use the API to make any configuration changes requiredThanks For your help !
It looks like you're new here. If you want to get involved, click one of these buttons!
Get useful and friendly help straight from the source.