如何使用 jQuery 显示进度条?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1398138/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to show progress bar with jQuery?
提问by omg
Just to tell the user that your request is being processed.
只是为了告诉用户您的请求正在处理中。
EDIT:
编辑:
I've find myself an image.
我找到了自己的形象。
(source: maishudi.com)
(来源:麦舒地网)
How to show it in the center of whole page?
如何在整个页面的中心显示它?
回答by Natrium
http://plugins.jquery.com/project/jQueryProgressBar
http://plugins.jquery.com/project/jQueryProgressBar
$(document).ready(function() {
$("#pb1").progressBar();
$("#pb2").progressBar({ barImage: 'images/progressbg_yellow.gif'} );
$("#pb3").progressBar({ barImage: 'images/progressbg_orange.gif', showText: false} );
$("#pb4").progressBar(65, { showText: false, barImage: 'images/progressbg_red.gif'} );
$(".pb5").progressBar({ max: 2000, textFormat: 'fraction', callback: function(data) { if (data.running_value == data.value) { alert("Callback example: Target reached!"); } }} );
$("#uploadprogressbar").progressBar();
});
or
或者
http://docs.jquery.com/UI/Progressbar
http://docs.jquery.com/UI/Progressbar
$("#progressbar").progressbar({ value: 37 });
回答by Kirtan
You can use one from Tips for Twits. Here's a demo.
您可以使用Tips for Twits 中的一个。这是一个演示。
回答by user1535967
This tutorial might help you a lot. It will atleast tell you from where to start!
本教程可能对您有很大帮助。它至少会告诉你从哪里开始!
http://www.youtube.com/watch?v=bYTRKfcG6Rg