DataTables / TableTools

Please note that TableTools has now been retired and replaced by the Buttons and Select extensions which offers significant improvements and API integration with the rest of DataTables and the other extensions.
http://datatables.net/
Other
237 stars 149 forks source link

Improve documentation for "Initialisation with 'new'" example #66

Closed wwuck closed 9 years ago

wwuck commented 9 years ago

The "Initialisation with 'new'" example page at http://datatables.net/release-datatables/extensions/TableTools/examples/new_init.html could do with an update to show where the TableTools options should be set. Currently, there's no way to know that you need to move the TableTools options from the DataTable() method to the TableTools() method.

eg.

$(document).ready(function() {
    var table = $('#example').DataTable({
        // don't set TableTools options here
    });
    var tt = new $.fn.dataTable.TableTools( table, {
        // set TableTools options here instead
    } );

    $( tt.fnContainer() ).insertAfter('div.info');
} );
DataTables commented 9 years ago

Good point - thanks!