jquery events do not recognise js-added html components?
<p>I'm using js to add form elements into the html document. For instance, I'm adding an entire <code>&lt;form&gt;</code> to a table cell. Eg:</p>

<pre><code>&lt;form class="add-comment"&gt;&lt;input type="submit" /&gt;&lt;/form&gt;
</code></pre>

<p>I try to use js to invoke events based on elements within that newly created form but nothing happens. I should get an alert box. What am I doing wrongly?</p>

<pre><code>$('.add-comment').submit(function() {
  alert('form submitted!');
});
</code></pre>

<p>Thanks.
Hope I explained it well enough.</p>
