title: JQuery AJAX append to appended element
body: <p>I am using RoR with AJAX to create posts. So I need an ability to add an 'answers' by previous id.<br />
  Every time submit button clicked following code being called</p>
  
  <pre class="lang-jquery prettyprint-override"><code>$("&lt;%= selector %&gt;").append("&lt;div id='&lt;%= newanswer %&gt;'&gt;&lt;%= escape_javascript(render('answer_layout')) %&gt;&lt;/div&gt;");
  </code></pre>
  
  <p>where<br />
  <code>selector</code> looks like this <code>#answer-12</code><br />
  <code>newanswer</code> would be <code>#answer-13</code><br /></p>
  
  <p>First time it works as suggested, but when I click submit second time I need to use already appended <code>#answer-13</code> div to append newly <code>#answer-14</code>, and it doesn't work. I understand that document doesn't know about first appended element, but have no idea how to resolve this issue. Thanks for any help.</p>
  
  <p><strong>UPDATED</strong>
  I render new <code>answer</code> with edit and destroy links, so I need not only an ability to append which could be workarounded, but fully interact with added elements  </p>