title: using the $(this) in event handler with typescript
body: <p>I saw many answers in the stackoverflow that were answered wrong and I wanted to make it clear at least for myself.
  the old question: using the $(this) in event handler with typescript. most of the answer was about using <code>event.target</code> </p>
  
  <p>The first problem is it's not only the <code>event.target</code> (most of the answer in stack overflow). I need to check for IE specific terms too (anyone that remember days before jquery at least knows that).</p>
  
  <p>the second problem is propagation.
  let say I have some elements like this </p>
  
  <pre><code>&lt;a href="#"&gt;&lt;i class="fa fa-open"&gt;&lt;span&gt;something is here&lt;/span&gt;&lt;/i&gt;&lt;/a&gt;
  </code></pre>
  
  <p>and i created a click event on <code>a</code> like this:</p>
  
  <pre><code>$("a").click((evt)=&gt;{
      evt = evt || window.event;
      var target = evt.target || evt.srcElement;
      console.log($(target));
  });
  </code></pre>
  
  <p>if there is enough padding and margin around this elements with proper clicking i can get the target as either of three elements <code>a</code>, <code>i</code>, <code>span</code></p>
  
  <p>now the headache will start, then I need to check what it clicked, is it the <code>a</code> or the <code>span</code> or even the <code>i</code></p>
  
  <p>time to time it bring redundant codes that was not needed if i could access to $(this).
  the beauty of $(this) is that it is returning the item that I was listening to, cross browser!</p>
  
  <p>in my case $(this) always reference to <code>a</code> and not any of the other child element. so i know for example if I want to access the <code>i</code> i need to search in child elements. but in the way that Typescript make me to use event i need to check where in the DOM i am (target is <code>span</code> or <code>a</code> or <code>i</code> !!!), then I decide to climb or get down in the tree or do the changes in the current element. </p>
  
  <p>I know there should be a better way. so the question is what is it?</p>