{hero}

table().container()

Since: DataTables 1.10.1

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

Description

DataTables places the main table and all of the various component display controls for the table inside a container element, a div element with a class of dt-container (by default).

This method, and its plural counterpart, provide the ability to obtain that container node, which can be used by plug-in authors to add additional controls to the table.

Type

function table().container()

Description:

Get the div container node

Returns:

HTML div node.

Example

Add a class to a single table container node:

var table = new DataTable('#myTable');

$(table.table().container()).addClass('selectable');

Related

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