This example exactly matches the functionality of the class control
example but in this case the classes are assigned using the columns.classNameDT
option.
Name | Position | Office | Age | Start date | Salary | Extn. |
---|---|---|---|---|---|---|
Name | Position | Office | Age | Start date | Salary | Extn. |
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 | $(document).ready(function() { $('#example').DataTable( { "ajax": "../../../../examples/ajax/data/objects.txt", "columns": [ { "data": "name", className: "all" }, { "data": "position", className: "min-phone-l" }, { "data": "office", className: "min-tablet" }, { "data": "extn", className: "min-tablet" }, { "data": "start_date", className: "never" }, { "data": "salary", className: "desktop" }, { "data": "extn", className: "none" } ] } ); } ); |
In addition to the above code, the following Javascript library files are loaded for use in this example: