{hero}

table().node()

Since: DataTables 1.10

Get the table node for the table in the API's context.

Description

DataTables and its plug-ins can create additional table elements in the document (for example when scrolling is enabled, 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 plural counterpart, is provided for that purpose.

Type

function table().node()

Description:

Get the table node

Returns:

HTML table node for the selected table.

Example

Add a class to a single table node:

var table = new DataTable('#myTable', {
	scrollX: '100%'
});

$(table.table().node()).addClass('highlight');

Related

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