How to prevent aoColumnDefs applying to header and footer in DataTables?
How to prevent aoColumnDefs applying to header and footer in DataTables?
darkhorn
Posts: 4Questions: 0Answers: 0
This is a part of my code where I apply class name into table cells.
[code]"aoColumnDefs" : [{
"sClass" : "email",
"aTargets" : [0]
}][/code]
However it applies also into tfoot and thead ths. How I can make it apply only into tbody th?
[code]"aoColumnDefs" : [{
"sClass" : "email",
"aTargets" : [0]
}][/code]
However it applies also into tfoot and thead ths. How I can make it apply only into tbody th?
This discussion has been closed.
Replies
[code]
tbody .email {
//rules
}
[/code]
instead of
[code]
.email {
//rules
}
[/code]
Same applies if you're using the class to bind events:
[code]
$('#myTable').on('click', 'tbody .email', function() {});
[/code]