Change row color in html table

Change row color in html table

Hi,
I need your help because I would like to change row color when input text is = 1

I'v tryied this, but not working:

 $("#mioTR").keyup(function() {     
          $('input[name^="attivo"]').toggleClass('disabilitato', parseInt($(this).val(), 10) < 2);               
     }).keyup();

this is my table;

<table>
<tr id="mioTR" >                
       <td><?php echo $ind;                                    ?></td>   
       <td align="left"><?php echo $row_docenti['cognome']     ?></td> 
       <td align="left"><?php echo $row_docenti['nome']        ?></td> 
       <td align="left"><?php echo $nascita ?><input type="hidden" name="<?php echo $nameTd="attivo".$ind?>"
       value="<?php echo $row_docenti['attivo']?>" /></td>
       <td align="left"><?php echo $row_docenti['MailDocente'] ?></td> 
     </tr>