开发者

How can I update using jQuery and NOT from a file the contents of a div?

开发者 https://www.devze.com 2023-02-27 04:31 出处:网络
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).

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

精彩评论

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

关注公众号