1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
<?xml version="1.0" encoding="UTF-8" ?>
<dt-api group="cells">
<name>cells().nodes()</name>
<summary>Get the DOM elements for the selected cells</summary>
<since>1.10</since>
<type type="function">
<signature>cells().nodes()</signature>
<description>Get the DOM elements for the selected cells</description>
<returns type="DataTables.Api">DataTables API instance with the `dt-tag TD` / `dt-tag TH` cell elements in the set</returns>
</type>
<description>
This method, used in-combination with the `dt-api 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.
</description>
<example title="Find cells with a jQuery contains selector and add a class"><![CDATA[
var table = $('#example').DataTable();
var cells = table
.cells( ":contains('Not shipped')" )
.nodes();
$( cells ).addClass( 'warning' );
]]></example>
<related type="api">cell().node()</related>
</dt-api>
|