select()

Since: Select 1.1.1

Initialise Select from outside of the constructor. Please note - this property requires the Select extension for DataTables.

Description

When a DataTable is constructed it emits the preInit event which Select can normally listen for and initialise the library for use on the table. However, if the table is constructed before being entered into the DOM this event does not trigger on the document so we need a different method to initialise Select. This method provides that ability.

This method should only be used for cases where the table is initialised before it is inserted into the DOM. It is not required at any other point.

Type

function select()

Description:

Initialise Select for a DataTable after the DataTable has been constructed.

Returns:

API instance, unmodified.

Example

Use of the select() method::

var table = $('#myTable').DataTable( {
	select: true
} );

table.select();