title: Simulate click on appended element
body: <p>I am trying to simulate a click on a element that I appended in.</p>
  
  <p>Example:</p>
  
  <pre><code>var html = "&lt;a data-fancybox data-src="#item52" id="fancy52" href="javascript:;"&gt;show&lt;/a&gt;";
  
  $("#places").append(html);
  </code></pre>
  
  <p>appended to:</p>
  
  <pre><code>&lt;div id="places"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Then to simulate a click I do the following:</p>
  
  <pre><code>$("#fancy52").click ();
  </code></pre>
  
  <p>But this doesn't work.  My only guess is because the content was added dynamically.  </p>
  
  <p>How can I simulate a click on this dynamic element?</p>