title: Jquery clickevent not working
body: <p>I am using loop function to fill some elements into div. Each element of that divs have onClick function. Problem is that onclick function is not firing.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>var Source = "#boxcard"; 
  var ImgSource = [
  
    "http://icons.iconarchive.com/icons/martin-berube/sport/96/Volleyball-icon.png",
    "http://icons.iconarchive.com/icons/reclusekc/kulo/96/Skull-1-icon.png"
  
  ];
  function OpenCard() {
  
      var id = $(this).attr("id");
      alert (id);
  }
  for (var y = 1; y &lt; 3 ; y++) {
      $.each(ImgSource, function(i, val) {
          $(Source).append("&lt;div class='flipper' id='flipper" + y + i + "'&gt; &lt;div class='front'&gt;&lt;/div&gt;&lt;div class='back'&gt;&lt;img src=" + val + " /&gt;&lt;/div&gt;&lt;/div&gt;");
          $("flipper" + y + i).click(OpenCard);
  
      });
  }
  </code></pre>