Customize the styles in table cells

Customize the styles in table cells

Hi,
I need to change the background color and the color  text in tr after calling php file with ajax. It works fine if a insert the number of the row where to change style css. But it not works if I give an index. This is my code with index (i), The value of the variable i is 5 (sure!!):

var i = $("#cont").val();
$('#miaDisp tbody tr:eq(i)').css('background-color','green');
$('#miaDisp tbody tr:eq(i)').css('color','white');   

and with number (5):

$('#miaDisp tbody tr:eq(5)').css('background-color','green');
$('#miaDisp tbody tr:eq(5)').css('color','white');

Thanks in advance    

Tegatti