Use .appendTo()
instead of .add()
Try this:
var error = 0;
var check = 0;
$("table img").bind('click',function(){
var letterArray = new Array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z');
var clickedValue = $(this).attr('name');
if(clickedValue ==letterArray[check]){
$(this).parent().empty();
check+=1;
} else {
error+=1;
$('<td><img src="images/xmark.png" alt="xmark" name="xmark"/></td>').appendTo("tr#error");
if(error==3){
alert("Game Over. Homer will now eat you!");
$("table img").unbind("click");
$("table img").css("opacity", "0.4");
}
}
});