{hero}

processing()

Since: DataTables 2.0.0

Set the processing indicator state for the DataTable.

Description

It can be useful at times to dynamically show and hide the "Processing" message that DataTables has available (processing). This is particularly true for plug-ins that require a period of processing or async interaction, such as fetching new data.

This method provides that ability to show and hide the processing indicator built into DataTables.

Note that for this method to work as expected, the processing option must be enabled (true).

Type

function processing( show )

Description:

Set the processing indicator visibility.

Parameters:
Returns:

API instance.

Example

Show the processing indicator and then hide after 5 seconds:

var table = new DataTable('#myTable', {
	processing: true
});

table.processing(true);

setTimeout(function () {
	table.processing(false);
}, 5000);

Related

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