开发者

Create a loading bar when user clicks a link

I need to create a loading bar when the user clicks a link and if necessary – to upload data (via Ajax) into div#work, then show the loading bar. When the data is upload开发者_JAVA百科ed then I want this script stopped, because I have files which are always loaded as background files. How to create this with jQuery?

ps: sorry but my english very bad :(


$("#ajax").click(function(){
   $("#work").show();

   $.post('data.php', {'data':'here'}, function(){
        $("#work").hide();
   });
});
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜