{hero}

cells().nodes()

Since: DataTables 1.10

Get the DOM elements for the selected cells.

Description

This method, used in-combination with the cells() method (and therefore the various selector forms that it allows) will obtain the DOM nodes for the selected cells, allowing them to be directly manipulated - for example adding a class.

Type

function cells().nodes()

Description:

Get the DOM elements for the selected cells

Returns:

DataTables API instance with the TD / TH cell elements in the set

Example

Find cells with a jQuery contains selector and add a class:

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

var cells = table
	.cells( ":contains('Not shipped')" )
	.nodes();

$( cells ).addClass( 'warning' );

Related

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