jQuery ProgressBar - 对象不支持?
只是想在网站上添加一个 jQuery 进度条。 我做了 jquery 文档所说的添加一个带有 id = Progressbar
然后我有:
<script src="include/jquery-1.5.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#progressbar').progressbar({ value: 37 }); //dies here
});
但我看到对象不支持此属性或IE 中的方法。它指向第“21”行字符 3,这就是该行:
$('#progressbar').progressbar({ value: 37 }); //dies here
我需要做其他事情才能显示此进度条吗?
编辑
我还添加了:
所以现在我没有看到错误,但我也没有看到进度条......
Just trying to add a jQuery progressbar on the site.
I did what the jquery docs said adding a div with id = progressbar
<div id="progressbar"></div>
Then I have:
<script src="include/jquery-1.5.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#progressbar').progressbar({ value: 37 }); //dies here
});
But I see object does not support this property or method in IE. It points to line "21" char 3 which is just that line:
$('#progressbar').progressbar({ value: 37 }); //dies here
Do I need to do something else to get this progress bar to display ?
Edit
I also added:
<script src="include/jquery-ui-1.8.13.custom.min.js" type="text/javascript"></script>
So now I dont see the error but I also don't see a progress bar...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(2)
包含 jQuery、jQuery UI js 文件和 jQuery UI CSS 文件,它应该会显示。我的猜测是你缺少 CSS 文件。
Include the jQuery, jQuery UI js file, and jQuery UI CSS file and it should show up. My guess is that you are missing the CSS file.
啊,我忘了添加 css 文件,它现在可以工作了。
Ahh I forgot to add the css file, its working now.