$.post('includes/script.php', $(this).serialize(), function(data) {
$('body').append(data);
});
alert ($('#new').length)
php script is <php echo "<div id="new">text</div>" ?>
it alerts 0, so it can’t see new div.
How can you make it see new div?
You have to wait till your post is done before you can check the length. Do something like this: