📜  来自数据库的数据库编号计数器动画 javascript - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:10.551000             🧑  作者: Mango

代码示例1
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));
        }
    });
}