This example shows the Responsive extension working with Ajax sourced data in the DataTable. Note that no special
initialisation is required. Responsive is enabled by adding the responsive
class to the table
element.
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 | $(document).ready( function () { $( '#example' ).DataTable( { "ajax" : "../../../../examples/ajax/data/objects.txt" , "columns" : [ { "data" : "name" }, { "data" : "position" }, { "data" : "office" }, { "data" : "extn" }, { "data" : "start_date" }, { "data" : "salary" } ] } ); } ); |
In addition to the above code, the following Javascript library files are loaded for use in this example: