select.className
Set the class name that will be applied to selected items.
Please note - this property requires the Select extension for DataTables.
Description
When table items are selected, Select will add a class to those items so it can be appropriately highlighted by CSS to show the end user that selection.
The Select and DataTables style sheets have appropriate classes to perform this action, however it can often be useful to be able to specify your own class to perform your own custom highlighting. This option provides that ability.
Type
string
- Description:
The class name that will be applied to the items selected in the DataTable. This can be multiple classes, separated by a space if required.
Default
- Value:
selected
Example
Set a custom class name for the item selection class:
new DataTable('#myTable', {
select: {
style: 'os',
className: 'row-selected'
}
});