title: Could not add click event on dynamically created anchor tag
body: <p>I am trying to register <code>click</code> event on <code>anchor</code> tag created dynamically but it is not working. Following is code</p>
  <pre><code>var location = 's';
  
  $('#phone').on('click', 'a', function(event) {
    console.info('Anchor clicked!');
    event.preventDefault();
    return false;
  });
  
  for(var i = 0; i &lt; 5; i++) {
    $(&quot;div#phone&quot;).append('&lt;ul&gt;&lt;a href=&quot;#&quot; id = &quot;' + location + '&quot;&gt; rajeev &lt;/a&gt;&lt;/ul&gt;');
  }
  </code></pre>
  <p>Have a look at <a href="https://jsfiddle.net/rajeevinkomm/3oy472om/1/" rel="nofollow noreferrer">Fiddle</a></p>
  <p><strong>Edit Updated Fiddle Link</strong></p>