DT child row class
DataTables Examples
HTML
<script src="//cdn.datatables.net/1.10.5/js/jquery.dataTables.min.js"></script>
<link rel="stylesheet" href="//cdn.datatables.net/1.10.5/css/jquery.dataTables.min.css">
<script src="http://www.bitstorm.org/jquery/color-animation/jquery.animate-colors.js"></script>
<table class="dataTable" id="example">
<thead>
<tr><th>id</th><th>data</th></tr>
</thead>
<tbody>
</tbody>
</table>
CSS
tr { color: blue; }
.child_class { color: red; }
JavaScript
$(document).ready(function() {
var dt1 = $('#example').DataTable({
searching: false,
lengthChange: false,
});
var childData = $("<tr><td>'a'</td><td>'eh?'</td></tr>");
var rowNode = dt1
.row.add([1, 'one'])
.child(childData, 'child_class').show()
.draw(false)
.node();
});