Inserting a button in <td> on condition.

Inserting a button in <td> on condition.

Hi everybody,
I'm still here because I need your help to realize something like that:
I have an html table, when value of <td> is > 6 I would like to color it red and when I click on it, it runs a js function. But only when the value inside <td> is < 6.
 
I have  a function that color the value inside <td> in red when it is < 6:

$('input[name^="voto"]') 
    .keyup(function() {
          $(this).toggleClass('highlight', parseInt($(this).val(), 10) < 6);
     }).keyup();

Thanks in advance.

Tegatti