this script should do:
  var  link = $("a"),
    rate = $('<div><a href="" class="fa fa-check-circle good"></a><a href="" class="fa fa-times-circle bad"></a></div>'),
    good = $(".good"),
    wrong = $(".bad");
    good.on("click", function() {
        $(this).closest("th").addClass("good");
    });
    wrong.on("click", function() {
        $(this).closest("th").addClass("verybad");
    });
- If I click to th show div with two a elements 
- If I click to element, for example with class .good, it should add parent .good class. 
you can find whole code here
 
     
    