Well folks I have a script to do ajax request every 1 second to show me new content but now I am having a problem that it every 1 second updates me the whole content I wanted to only show up if there is a new one content in the database.
The script I'm using and this
<script>
//LISTA POSTS ESTABELECIMENTOS
$(document).ready(function() {
$.ajaxSetup({ cache: false }); // This part addresses an IE bug. without it, IE will only load the first number and will never refresh
setInterval(function() {
$('#mostra_posts').load('ajax/mostra_posts.php?id_estabelecimento=<?php echo $row->id; ?>');
}, 1000); // the "3000" here refers to the time to refresh the div. it is in milliseconds.
});
// ]]>
</script>
I would like to know how I can use this script.