This example exactly matches the functionality of the class control example but in this case the classes are assigned using the
columns.className
option.
Name | Position | Office | Salary |
---|---|---|---|
Name | Position | Office | 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" , className: "all" }, { "data" : "position" , className: "min-phone-l" }, { "data" : "office" , 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: