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.
What am I doing wrong?
$('<div>blabla<span id="remove">X</span></div>').insertAfter($("#add"));
$('#remove').click(function(){
$(this).hide();
});