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();
});
});
精彩评论