Skip to content

Instantly share code, notes, and snippets.

@iArnaud
Last active August 29, 2015 13:58
Show Gist options
  • Save iArnaud/9953501 to your computer and use it in GitHub Desktop.
Save iArnaud/9953501 to your computer and use it in GitHub Desktop.
datatables
$.fn.dataTable.fnTables(true); //this gets all visible dataTables...
$('#givenTable').dataTable().fnAdjustColumnSizing(); //this adjusts a given dataTable
$.each($.fn.dataTable.fnTables(true), function(singleTable) {
$(singleTable).dataTable().fnAdjustColumnSizing();
}); // And this just don't work! Don't know why...
$.each($.fn.dataTable.fnTables(true), function(idx, singleTable) {
$(singleTable).dataTable().fnAdjustColumnSizing();
}); // This works!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment