{hero}

buttons().active()

Since: Buttons 1.0.0

Set the active state for the selected buttons.
Please note - this property requires the Buttons extension for DataTables.

Description

Buttons can be placed into an "active" state which is purely a styling function to visually show to the end user that the button is active (i.e. whatever operation it performs is currently active). This can be useful if you have a number of different modes of operation that the user can select from, but only one can be active at a time.

This method can be used to dynamically change the active state for the selected buttons.

Types

function buttons().active()

Description:

Get the active state for the selected buttons.

Parameters:
Returns:

API instance which contains true if currently active, otherwise false for each selected button in the result set.

function buttons().active( state )

Description:

Set the active state for the selected button.

Parameters:
Returns:

DataTables API instance with the selected buttons in the result set, available for chaining further operations on the buttons.

Example

Remove the active state from all buttons:

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

table.buttons().active(false);