Jquery id not found when added with insertAfter
<p>After a page is loaded a user can add some text and with every add, I add a little 'x' so the text can be removed.
But when I create a click event on the id of the 'x', nothing happens, I can't click on it.</p>

<p>What am I doing wrong?</p>

<pre><code>$('&lt;div&gt;blabla&lt;span id="remove"&gt;X&lt;/span&gt;&lt;/div&gt;').insertAfter($("#add"));


$('#remove').click(function(){
 $(this).hide();
</code></pre>

<p>});</p>
