title: How to get event.target of anchor tag?
body: <p>I'm trying to get the <code>event.target</code> of clicked link. I have wrapped one of the anchor tags around an image like this:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$("a").click(function(event) {
    alert(event.target);
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;a href="#link1"&gt;link 1&lt;/a&gt;
  &lt;br/&gt;
  &lt;a href="#link2"&gt;
    &lt;img src="http://maxcdn.thedesigninspiration.com/wp-content/uploads/2013/10/Despicable-Me-Minions-014.jpg"&gt;
  &lt;/a&gt; &lt;!-- anchor tag wrapped around img --&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Here, in case of "link 1" (when it's clicked), I get the desired value (i.e. <code>"http://stacksnippets.net/js#link1"</code>). But, in case of the image (when it's clicked), I'm getting "Object HTMLImageElement". How can I get the value <code>"http://stacksnippets.net/js#link2"</code> when the image is clicked?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I need to get <code>"http://stacksnippets.net/js#link2"</code> when the image is clicked, analogous to <code>"http://stacksnippets.net/js#link1"</code> in case of "link1".</p>