How to quickly highlight the current table row on mouse hover with jQuery
very simple
$('table td').hover(function()
{
$(this).parent().find('td').css('background', 'rgb(199, 255, 181)');
}, function()
{
$(this).parent().find('td').css('background', 'white');
})
it doesn't work for me on some rows, on the ones I add to the table at runtime
$('table tr').eq(0).after( '
| | |
') $(document.body).on('mouseenter', 'table.list tr', function()
{
$(this).find('td').addClass('selrow');
});
$(document.body).on('mouseout', 'table.list tr', function()
{
$(this).find('td').removeClass('selrow');
});
thanks
Comments