0
当某个值出现错误时,我尝试突出显示某一行,而是突出显示mouseover上的每一行。Datatables - 突出显示mouseover上的行
我的错误在哪里?
https://jsfiddle.net/p0np06mx/
$('#table1').DataTable({
"bFilter" : false,
"ordering": true,
columnDefs: [{
orderable: false,
targets: "no-sort"}],
"paging": false,
drawCallback: function (settings) {
$('#table1 tr').each(function() {
var Cell = $(this).find('td:eq(3)');
debugger;
if (Cell.text() !== 'error') {
$(this).find('button').hide();
$(this).find('textarea').hide();
}else{
$(this).parent().on('mouseover', 'tr', function() {
$(this).css('background-color', '#ff6900');
$(this).bind("mouseout", function(){
$(this).css('background-color', '');
});
});
}
});
}