I have a textarea
where the messages put by user1 and user2 are placed , what I want is that every so often, for example 5 seconds, div
only the user is updated.
For this I have found several examples where they use load
passing a page to load.
$(document).ready(function() {
var refreshId = setInterval(function() {
$("#feedback-bg-info").load("url a cargar")
.error(function() { alert("Error"); });
}, 1000);
$.ajaxSetup({ cache: false });
});
In this part $("#feedback-bg-info").load("url a cargar")
, in the method load
, what I am looking for is that only the is updated div
without passing it a different route.