【发布时间】:2019-07-29 03:05:59
【问题描述】:
在对数据表进行服务器端处理后,我想为特定数据添加样式。
我使用wrap() 来执行此操作,但它不起作用。
"fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
if (aData[4] == 'service stopped'){
console.log('here');
$(aData[4]).wrap('<span class="badge-sm badge-danger"></span>');
}
},
这给了我 3 'here' 这是正确的,但 '' 没有显示。
【问题讨论】:
标签: jquery css datatables server-side