Responsive redraw on multiple tables
Responsive redraw on multiple tables
I'm looping through a collection of items that I'm appending to tables.  When I'm done, I'm creating all of the DataTables via:
$('table.table').DataTable( { ... });
There are at least ten tables.  How can I force a recalc on every one?  I know on one, I can do:
DataTable.columns.adjust()
.responsive.recalc();
Should I $.each of the results of the first query?
This question has an accepted answers - jump to answer
This discussion has been closed.
            
Answers
This is what I do after all tables have loaded. I had the $.each in there as well and then replaced it with $.fn.dataTable. Columns.adjust is enough if you do this initially because there will not have been a user change of the screen size by then.
Thanks!