title: Javascript - changing image won't work unless i alert()
body: <p>I'm building a JavaScript based poker game that get some updates from a server via Ajax.</p>
  
  <p>when player are in "show down" each one of them supposed to show what card he holds,
  I'm changing the pictures of each showdown hand (from blank card to an actual card i.e King of spades img)</p>
  
  <p>I have the weirdest problem: when i change the images (as shown in the code below),
  the images wont change from blanks to actual cards, they remain "blank.png".
  whats weird is if i remove the "//" from line9 (and get an alert message) the cards are shown with their actual image i.e "Ace of spades.png"..
  what's with that?!</p>
  
  <pre><code>function executeShowDown(){
      (...)
  var playerCard1Id = "#player"+(playerNum)+"card1"; //the specific image id for hole card #1
  var playerCard2Id = "#player"+(playerNum)+"card2"; //the specific image id for hole card #2
  var card1 = "res/images/cards/"+handArr[0]+".png";
  var card2 = "res/images/cards/"+handArr[1]+".png";
  $(playerCard1Id).attr("src", card1);   
  $(playerCard2Id).attr("src", card2); 
  $(playerCard1Id).css('visibility','visible');
  $(playerCard2Id).css('visibility','visible');
  //alert("endShowDown");         #@#@# LINE 9 #@#@#
      return;
  }
  </code></pre>