How to add submit event to dynamically generated form?
<p>Here is the PHP code that generates the form:
form.php </p>

<pre><code> &lt;?php
    echo '
    &lt;form action="/wall/comment.php" method="post" id="submit-comment-form" name="'.$postid.'"&gt; 
    &lt;div class="write-comment-profile-pic"&gt;
    &lt;img src= "'.$myprofilepic.'" width="30" height="30""/&gt;
    &lt;/div&gt;
    &lt;div class="write-comment-textbox-wrap"&gt;
    &lt;input type="text" class="textbox4" id="write-comment-textbox" value="Write a comment..." name="comment" style="width:65%;" /&gt;
    &lt;/div&gt;
   &lt;/form&gt;
   ';
   ?&gt;
</code></pre>

<p>Jquery code which gets the form.php</p>

<pre><code>$('#images img').click(function() { 
$.get('form.php', function(data) {
$('#image-pop-up').html(data);
});
});
</code></pre>

<p>AND here is the jquery code to needs to submit the form:</p>

<pre><code>$('#image-pop-up').on('submit', '#submit-comment-form', function() { 
evt.preventDefault();       
});
</code></pre>

<p>in index.html image-pop-up div is an empty one 
just </p>

<p><code>&lt;div id="image-pop-up"&gt;</code></p>

<pre><code>&lt;/div&gt;
</code></pre>

<p>this isn't working... what's wrong? how to fix it?</p>
