title: Event click on href <a> tag
body: <p>I have a question about Javascript event here. I have an <code>&lt;a&gt;</code> tag like this:</p>
  <p><code>&lt;a id='aTag' href='http://example.com'&gt;Click to redirect&lt;/a&gt;</code></p>
  <p>Then I call an event like:</p>
  <pre><code>&lt;script&gt;
  $('#aTag').click();
  //or
  $('#aTag').trigger('click');
  &lt;/script&gt;
  </code></pre>
  <p>It does not redirect me to <code>http://example.com</code>. I tried to add an <code>onClick()</code> event in the <code>&lt;a&gt;</code> tag like this:</p>
  <pre><code>&lt;a id='aTag' href='http://example.com' onclick='alert(&quot;Event happened&quot;);'&gt;Click to redirect&lt;/a&gt;
  </code></pre>
  <p>And then call the <code>.click()</code> event. It shows me <code>alert(&quot;Event happened&quot;)</code>;</p>
  <p>Can anyone show me how to call the <code>.click()</code> event correctly, or correct this redirect with issue with the <code>href</code> in that <code>&lt;a&gt;</code> tag?</p>
  <p>In my business I just need an <code>&lt;a&gt;</code> tag, so not with the <code>window.open</code> or <code>windown.location</code>.</p>