title: jquery, cannot add img in td
body: <p>The setup of my html is I have alphabet imgs inside td. User should click the imgs alphabetically, every correct click the img is removed. If wrong, an xmark will appear.</p>
  
  <p>(not yet in the code: after three wrongs, it's game over, and then i will ask user if he wants to play again or go back to home)</p>
  
  <p>This is my jquery code:</p>
  
  <pre><code>  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;
                  $("error").add('&lt;td&gt;&lt;img src="images/xmark.png" alt="xmark" name="xmark"/&gt;&lt;/td&gt;');
                  if(error==3){
                      alert("Game Over. Homer will now eat you!");
                      $("table img").unbind("click");
                      $("table img").css("opacity", "0.4");
                  }
              }
          }); 
  </code></pre>
  
  <p>my table in html: just posted the first 6 letters for brevity. </p>
  
  <pre><code>       &lt;table&gt;
              &lt;tr class="rows"&gt;
                  &lt;td&gt;&lt;img src="images/Z.png" alt="Z" name="Z"/&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;img src="images/R.png" alt="R" name="R"/&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;img src="images/S.png" alt="S" name="S"/&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;img src="images/U.png" alt="U" name="U"/&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;img src="images/B.png" alt="B" name="B"/&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;img src="images/A.png" alt="A" name="A"/&gt;&lt;/td&gt;
              &lt;/tr&gt;
         &lt;/table&gt; 
         &lt;table&gt;&lt;tr id="error"&gt;&lt;/tr&gt;&lt;/table&gt;
  </code></pre>