Created
December 6, 2019 10:26
-
-
Save pvin/ff2be02204819488752a2bbed1f7e57e to your computer and use it in GitHub Desktop.
Datatables on-the-fly resizing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/DataTables/Responsive/issues/40 | |
https://stackoverflow.com/questions/8278981/datatables-on-the-fly-resizing/39157482#39157482 | |
$(document).ready(function() { | |
$('a[data-toggle="tab"]').on( 'shown.bs.tab', function (e) { | |
$($.fn.dataTable.tables( true ) ).css('width', '100%'); | |
$($.fn.dataTable.tables( true ) ).DataTable().columns.adjust().draw(); | |
} ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment