我正在尝试在文本框中使用以下代码来加注编号 。
// Animate the element s value from 0 to 1100000:
$({someValue: 0}).animate({someValue: 1100000}, {
duration: 1000,
step: function() { // called on every step
// Update the element s text with value:
$( #counterx ).text(Math.floor(this.someValue+1));
}
});
it is working with small numbers like from 0 to 100 but when it comes to large number like in the mentioned code, it is not giving the target number, it is animating to numbers like 1099933 or 1099610 or ..... and every time it changes.
那么我怎样才能让它与我指定的数字动画相匹配呢?