columnDefs : add a class to all columns
columnDefs : add a class to all columns
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
Hi,
Is there a shortcut version to add a class to all the columns in columnDefs so I don't have to write all targets like that ?
```
{ className: 'valign-top', targets: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] }
I don't want to change the CSS of the original <td> because I have multiple datatables and only one of them need this additional style.
Thank you.
This question has an accepted answers - jump to answer
Answers
See the
columnDefs.targets
docs for all the options. Use"_all"
to choose all the columns.Kevin
hahaha, I've tried all without the underscore, I've read the page and miss the line with _all. The heat have already damaged my brain !
Thanks Kevin