Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- incrementNumber = function($block, start, finish, duration) {
- if (typeof(start)=='undefined') {
- var start = 0;
- if ($block.text().trim()*1)
- start = $block.text().trim()*1;
- }
- for (var i=0; i<=duration/100; i++) {
- var nb = Math.round(finish/((duration/100)/i));
- setTimeout(function(nb) {
- $block.html(nb);
- }.bind(null,nb),i*100);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement