title: Getting a value from a click event
body: <pre><code>&lt;div id="card0"&gt;
  &lt;div id="card1"&gt;
  &lt;div id="card2"&gt;
  &lt;div id="card3"&gt;
  &lt;div id="card4"&gt;
  </code></pre>
  
  <p>I have created a card, deck, and hand "class."
  What I would like to do is create an event handler for an array of cards.</p>
  
  <pre><code>for (var i = 0; i &lt; 5; i++) {
      myHand.cards[i] = myDeck.deal();
  }
  </code></pre>
  
  <p>I would like to do also in the loop to create event handlers:</p>
  
  <pre><code>$("#card"+i).on("click", cardClicked);
  function cardClicked() {
      alert(this);
  }
  </code></pre>
  
  <p>Is there a way to find out which div was clicked on?  I have tried doing an anonymous function passing event. I have tried with this, but I don't know what else to try.</p>