0
我试图让我的代码的HTML和一些reasong当我尝试运行我的HTML文档中的代码,这是行不通的,但我对http://jsfiddle.net 尝试相同的代码和我的代码,它正在http://jsfiddle.net/gPfBC/我的动画进度条不起作用?
有人可以尝试这个代码,并把它给我的完整的HTML代码?
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script>
$(document).ready(function(){
var p=0;
$("#myProgressBar").progressbar({value:0});
var timer = setInterval(function(){
//This animates the bar
$("#myProgressBar .ui-progressbar-value").animate({width: p+"%"}, 500);
//This does static sets of the value
//$("#myProgressBar").progressbar("option","value",p);
p = p +3;
if(p>33.33){
$("#myProgressBar .ui-progressbar-value").animate({width: "33.33%"}, 500);
//$("#myProgressBar").progressbar("option","value",100);
clearInterval(timer);
}
},500);
});
</script>
<style type="text/css">
</style>
</head>
<body style=" background:url(ebay-bar/images/1.jpg) top left no-repeat; width:1099px; height:1050px;">
<a href="2.html" style="width:185px; height:31px;position:absolute; left: 198px; top: 516px;"></a>
<div style="width:954px; position:absolute; top:606px; left: 67px; height: 45px;">
<div id="myProgressBar" style="height:43px;"></div>
</div>
</body>
</html>
非常感谢你,你完全正确!我没有话要带你!我在这里疯了:P – karlelizabeth 2012-01-11 07:58:50