最后缺少两位数,为什么? Javascript output is in white and the desired numbers are in black above
Js代码:
$('.count').each(function () {
$(this).prop('Counter', 0).animate({
Counter: $(this).text()
}, {
duration: 1000,
easing: 'swing',
step: function (now) {
$(this).text(now);
}
});
});
答案 0 :(得分:1)
答案 1 :(得分:-1)
使用
解决它$(this).text(valueOf(now));
而不是:
$(this).text(now);