开发者

ajax loading progress animation

$(function(){
    $(document).ready(function(){
    $('#demo_content').html('<img src="/ajax-loader.gif"alt="Wait" />');

        $('#demo_content').load('/myphp.php?nice=1149632');
          $("#demo_content").html('');
        return false;
        cache:false

    });
});

This script will load my data into the page but I cannot get my loader image to display while开发者_如何学运维 the ajax is loading. Can anyone give me advice as to how I would edit this to function correctly? Thank you.


The $("#demo_content").html(''); line removes the image immediately before it's displayed. You should remove it and try again.


$(function(){ $(document).ready(function(){ $('#demo_content').html(''); $('#demo_content').load('/myphp.php?nice=1149632'); return false; cache:false }); });
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜