Add-more-posts.php:\[code\]ob_start();//SOME HTML CONTENTS!$contents = ob_get_clean();if(!empty($contents)){ echo $contents;}else{ echo 'end';}\[/code\]jQuery in Index.php:\[code\]$(document).ready(function(){ $('#get-more').click(function(){ $('#get-more').hide(); $('#loading-img').slideDown(); var post_id = $('div.more').attr('id'); if(!$("#empty-div").hasClass('ended')){ $.post("add_more_posts.php", {'post_id': post_id} , function(data){ if(data =http://stackoverflow.com/questions/15471562/='end'){ $("#empty-div").addClass('ended'); $('.more').remove(); $('#get-more').hide(); $('#loading-img').fadeOut(); $('div#AddPosts').append('Finished Loading!'); }else{ if(!$("#empty-div").hasClass('ended')){ $('.more').remove(); $('#loading-img').remove(); $('div#AddPosts').append(data); $('#get-more').show(); } } }); } });});\[/code\]The problem is that it is not ending. It is not catching the data =http://stackoverflow.com/questions/15471562/='end' but rather it is appending 'end' into my div in my index.php.What is the problem?