row().node()

Since: DataTables 1.10

Get the row TR node for the selected row.

Description

This method is used to get the tr node of row matched by the row() selector used.

Please be aware that using deferRender will cause some nodes to be created only when they are required for display, so they might not be immediately available when this method is called.

As a singular function, row().node() operates on only a single row and will truncate other rows if more than one is found to match the selector used. Use rows().nodes() if you require to work with multiple rows.

Type

function row().node()

Description:

Obtain the tr node for the selected row

Returns:

tr element of the selected row or null if the element is not yet available

Example

Add a class to a specific row:

var table = $('#example').DataTable();

var row = table
	.row( '#row-4' )
	.node();

$(row).addClass( 'ready' );

Related

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