I have a chat and I need to update automatically by sending the automatic scroll down, the problem is that at the time of reloading the div is embedded in the whole web page on that div, I leave the code and error:
<div id="chat"></div>//DIV QUE DESEO RECARGAR
<script>
$(document).ready(function() {
var refreshId = setInterval( function(){
$('#chat').load(perfil2-chat.php);//actualizo el div
}, 1000 );
});
</script>