📅  最后修改于: 2022-03-11 15:02:10.551000             🧑  作者: Mango
function numberAnimation(id, value) {
number = $("#"+id).text();
jQuery({Counter: number}).animate({Counter: value},{
duration: 500,
easing: 'swing',
step: function() {
// What todo on every count
$("#"+id).html(Math.floor(this.Counter));
},
complete: function() {
$("#"+id).html(Math.floor(this.Counter));
}
});
}