我正在使用動態增長的進度條。 進度條下方是百分比值,也是動態生成的。如何用javascript增加百分比值
$('.progress-bar').animate({ width: '100%' }, {
duration:2000,
step: function(now, fx) {
if (fx.prop == 'width') {
var newval = Math.round(now * 100)/100 + '%';
$([this, $(this).nextAll('.count')[0]]).html(newval);
}
}
});
這是我到目前爲止有:http://jsfiddle.net/zjdBh/34/
我怎樣才能擺脫在進度的百分比值嗎?下面的百分比應保持不變,但在進度條的textvalue應該消失
太棒了!感謝你的回答 –