$()

Since: DataTables 1.10

Perform a jQuery selection action on the full table.

Description

DataTables makes heavy use of DOM manipulation, removing rows from the document for paging and searching, and removing columns from the document for column visibility, among other actions. jQuery will not find these removed DOM elements when using a standard jQuery statement since it uses the document as the root element and some nodes under DataTables' control have been removed from the document.

To provide an easy method to continue using jQuery on these elements, so you can select elements regardless of searching, paging or any other feature of DataTables this method is provided.

The selector given to the $() method will be run on all of the tr elements in the table, and their descendent elements, with the found elements being returned as a jQuery object.

Type

function $( selector [, modifier ] )

Description:

Perform a jQuery selector on the rows and contents of the rows in the tables' tbody elements.

Parameters:
Returns:

jQuery object with the matched elements in its result set.

Example

Find all cells with content's 'High' and add a class:

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

table
	.$(':contains("High")')
	.addClass('important');