开发者

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');
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜