{hero}

div.className

Since: DataTables 2.1

Set the class name for the created element.

Description

This option is used to set a class name on the div element that is created by the div feature. This can be useful for styling or dynamic manipulation.

Example

Set text with an class name assigned to the container element:

new DataTable('#myTable', {
	layout: {
		topStart: {
			div: {
				className: 'warn',
				html: 'Click button to acknowledge: <button>Ack</button>'
			}
		}
	}
});

Related

The following options are directly related and may also be useful in your application development.