{hero}

buttons().remove()

Since: Buttons 1.0.0

Remove and delete the selected buttons.
Please note - this property requires the Buttons extension for DataTables.

Description

This method provides the ability to dynamically remove one or more buttons from a table after initialisation. The inverse of this method is button().add() which can be used to add a new button dynamically.

Important: This method will effect the indexes of other buttons in the instances. If you are using index based selectors for the buttons, please ensure that you take this into account for API interactions after calling this method.

Type

function buttons().remove()

Description:

Remove the selected buttons from the display. These buttons are destroyed and can no longer be used once removed.

Returns:

DataTables API instance.

Example

Remove all buttons with the class .export:

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

table.buttons('.export').remove();