<body> <div id="number"></div> </body>
<script type="text/javascript"> function magic_number(count) { var num = $('#number'),start = 0; num.animate({count: count}, { duration: 1500, step: function() { if(start <= count){ num.text(parseInt(start++)); }; } }); }; magic_number(100); </script>