Customized color on each header on Datatables

Customized color on each header on Datatables

spiderkznspiderkzn Posts: 44Questions: 12Answers: 0
edited September 16 in Free community support

Hi,

I want to customized the different color on each header on datatable. So I know this one which it default set whole header.

customize: function (doc, row) {
//default header color
$(doc.document.body)
.find("table thead tr th")
.addClass("header-background-color");
}

But I would like to custom the colour on specific header. as I've tried

customize: function (doc, row) {
//red header
$(doc.document.body)
.find("table thead tr th td:nth-child(0)")
.addClass("red-header-background-color");
}

But nothing working so far. Can anyone help? thanks

This question has an accepted answers - jump to answer

Answers

Sign In or Register to comment.