【发布时间】:2018-04-10 08:40:59
【问题描述】:
fnRowCallback: function(nRow, aData, iDisplayIndex) {
$('td', nRow).each(function() {
//$(this).addClass('bold'); --> works to bold entire row
// $("table tr td:nth-child(0)").addClass('bold'); -> doesn't work
// $("table tr td:nth-child(2)").addClass('bold'); -> doesn't work
console.trace("hello");
//$(this).css('color', 'red'); -> works to change the color of the entire row
});
return nRow;
},
我试图只在我的 DataTable 中将第一个和第二个字段设为粗体
【问题讨论】:
标签: javascript jquery datatables css-selectors