<p id="dynamic-number">0</p>
var test = $('#dynamic-number');
function anim(el, number){
currentNumber = parseFloat(el.text());
$({numberValue: currentNumber}).animate({numberValue: number}, {
duration: 300,
easing: 'linear',
step: function() {
el.text(Math.ceil(this.numberValue));
}
});
}
anim(test, 4444);