How to get a list of dataTables by class?
How to get a list of dataTables by class?
I'm sure I'm missing something here, but I have multiple tables on a page and I want to get hold of the external api (for each table) in overlapping groups of these tables. The different table groups are (currently) managed by assigning different classes to the various tables. Groups overlap when single tables have assigned more than one such class (group).
So my question is; how to (j)query for a list of dataTable instances, by class, where each item exposes the external (backward compatible) API for that table instance?
I can achieve something similar by querying by class, and then dataTable().dataTableSettings, and then iterating over [each].oApi but - and it's a big 'but' - this is messy, it only gives me access to the internal API (i.e. '_fn...') and I guess the internal API will not be guaranteed to be compatible between versions?
I'm sure I'm being a bit dumb but I really don't want to have to query for the table instances by ID.
Any help would be very much appreciated.
So my question is; how to (j)query for a list of dataTable instances, by class, where each item exposes the external (backward compatible) API for that table instance?
I can achieve something similar by querying by class, and then dataTable().dataTableSettings, and then iterating over [each].oApi but - and it's a big 'but' - this is messy, it only gives me access to the internal API (i.e. '_fn...') and I guess the internal API will not be guaranteed to be compatible between versions?
I'm sure I'm being a bit dumb but I really don't want to have to query for the table instances by ID.
Any help would be very much appreciated.
This discussion has been closed.