How can I update using jQuery and NOT from a file the contents of a div?
how can I reload the contents of a div not by using the .load('file')
? Just the contents of it (they are dynamically updated upon refresh).
<div id="myreload">
.
.
.
</div>
This is a code I used to use
<script language="JavaScript">
$(function() {
var SANAjax = function(){
$('#details').empty().addClass('loading')
.load('home.php', func开发者_JAVA百科tion() {
$(this).removeClass('loading')
});
}
setInterval(SANAjax, 5000 );
});
</script>
Thank you all.
$('#myreload').html('your contents here');
精彩评论