I tried this
$(document).ready(function(){
var conntent = $("#conntent");
$('#form_post').submit(function(){
if($("#set").val() != ''){
$.post('post.php', $("#form_post").serialize(), function(data){
conntent.append('<div class="item"><span>' + data +
'</span></div>');
});
}
$("#set").val('');
return false;
});
//Then I try to click on new the new element
$('span').click(function(){
alert("OK");
});
});
However, after this I can't use click on the spans
I think is it possible after appending them that the are not part of the DOM. Any suggestions?