{hero}

tables().nodes()

Since: DataTables 1.10

Get the table nodes for the tables in the API's context.

Description

DataTables and its plug-ins can create additional table elements in the document (for example when scrolling is enable, the table is split into three individual tables, the header, footer and body in order to provide cross-browser scrolling). However, you may wish to obtain the original table node that belongs to the DataTable. This method, and its singular counterpart, is provided for that purpose.

Type

function tables().nodes()

Description:

Get the table nodes

Returns:

DataTables API instance with the table nodes from the selected tables in the result set.

Example

Add a class to all main table nodes:

var tables = $('.dataTable').DataTable( {
	scrollX: "100%"
} );

tables
	.tables()
	.nodes()
	.to$()
	.addClass( 'highlight' );

Related

The following options are directly related and may also be useful in your application development.