Since: DataTables 1.10

Destroy any existing table matching the selector and replace with the new options.


Initialise a new DataTable as usual, but if there is an existing DataTable which matches the selector, it will be destroyed and replaced with the new table. This can be useful if you want to change a property of the table which cannot be altered through the API.

Note that if you are not changing the configuration of the table, but just altering the data displayed by the table, it is far more efficient to use the ajax.reload() method (or rows.add() etc).


This option can be given in the following type(s):


  • Value: false


Destroy an existing table and create a new one:

new DataTable('#myTable', {
	scrollY: '200px'

// Some time later, recreate without (no scrolling)
new DataTable('#myTable', {
	destroy: true


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