开发者

Create a loading bar when user clicks a link

开发者 https://www.devze.com 2023-03-29 07:02 出处:网络
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

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

精彩评论

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