jquery - Datatables - highlight row on mouseover -
i try highlight row when value error instead highlights every row on mouseover.
where mistake?
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', ''); }); }); } }); }
Comments
Post a Comment