我使用的是 jQuery 1.7.2,而 jQuery-ui 是 1.10.4。我的代码在 FireFox 中完美运行。我的 jQuery 代码如下。
$(document).ready(function () {
$("#progressbar").show();
$("#progressbar").progressbar({
value: false
});
progress(10, "Initialize");
/* If Season Year is zero than throw error */
if (seasonYearCount == 0) {
progress(0, Res.errGeneratingSchedule);
return;
}
if (seasonYearMonthCount == 0) {
$("#lbErrorMsg").text(Res.errGeneratingSchedule);
progress(0, Res.errGeneratingSchedule);
alert(Res.setupSeasonYearMonth);
return;
}
if (productYearCount == 0) {
progress(15, "Adding Products");
}
$.each(productArray, function (index, product) {
progress(17, "Adding Complaints");
});
_days = daysInMonth($("#dpMonth").val(), $("#dpYear").val());
for (var pWC = 0; pWC < _productWithComplaint.length; pWC++) {
progress(pWC + 17, "Making Plan");
//console.dir(_plan);
progress(100, "Complete");
$("#progressbar").hide();
});
function progress(value, text) {
$("#progressbar").progressbar("value", value);
var currValue = $("#progressbar").progressbar("value");
$("#lbMessage").text(text + " - " + currValue + "%");
}
这是我的 HTML 代码
<div id="progressbar" style="display:none;">
<div id='lbMessage'>Loading...</div>
</div>
有人可以帮忙吗...