Since: Buttons 1.0.0

Destroy one or more button instances and remove from the document.
Please note - this property requires the Buttons extension for DataTables.


This method provides the ability to "destroy" one or more instances of the Buttons class. The destroy action will remove all DOM elements that is controls from the document and release any event handlers it holds.

When using the buttons() selector method, the second argument (the buttons selector) is effectively ignored when processing this method. Only the button instances are used.

This method is invoked automatically if the DataTable destroy() method is called on the host DataTable.


function buttons().destroy()


Destroy the selected button instances, removing the container and all button elements from the document.


DataTables API instance.


Destroy all button instances:

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


Destroy button instance 0 only:

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

table.buttons(0, null).destroy();