JSFiddle - React, Tailwind, and code Playground

HTML

<div></div>

CSS

div {position:absolute; top:100px; left:10px; width:150px; background:#eee; color:#444; font-family:Arial, Helvetica, sans-serif; text-align:center; padding:30px 0; border:1px solid #000;}

JavaScript

$(function () {
	var div = $('div');
	
	div[0].val = 0;
    
	div.animate({
			top:10,
			val:10000
		}, {
			step: function () {
                $(this).text('saving: ' + Math.round(this.val) + ' $');
			}
		},
		200
	);
	
});