I have 2 pages chat.php and allchat.php and I can successfully load allchat.php page in chat.php div after 10 seconds Here is a code
$(document).ready(function(){
setInterval(function() {
$("#abc").load("allchat.php");
}, 10000);
});
Now If I have a div having id "def" in chat.php and How I do to refresh this div after 10 second. Remember I don't load any otherpage like in above code I try this code but It is not working
$(document).ready(function(){
setInterval(function() {
$("#abc").load("chat.php #def");
}, 10000);
});
Just like for the div abc
you created a separate page i.e. allChat.php
similarly for the div def
you should also create a separate page say def.php
then after 10 sec load this page in exactly same way.