This TableTools example shows DataTables using its ability to Ajax load object based data and operate in exactly the same manner as when the data is read directly from the document.
Name | Position | Office | Extn. | Start date | Salary |
---|---|---|---|---|---|
Name | Position | Office | Extn. | Start date | Salary |
Loading... |
The Javascript shown below is used to initialise the table shown in this example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | $(document).ready(function() { $('#example').DataTable( { dom: 'T<"clear">lfrtip', "ajax": "../../../../examples/ajax/data/objects.txt", "columns": [ { "data": "name" }, { "data": "position" }, { "data": "office" }, { "data": "extn" }, { "data": "start_date" }, { "data": "salary" } ], deferRender: true } ); } ); |
In addition to the above code, the following Javascript library files are loaded for use in this example: