Unknown | 4a4d5d7 | 2019-01-22 19:37:41 -0500 | [diff] [blame] | 1 | /* $('.counter').counterUp({ |
Unknown | 1c58035 | 2019-01-11 09:56:35 -0500 | [diff] [blame] | 2 | |
Unknown | 4a4d5d7 | 2019-01-22 19:37:41 -0500 | [diff] [blame] | 3 | }); */ |
| 4 | $('.counter').each(function() { |
| 5 | var $this = $(this), |
| 6 | countTo = $this.attr('data-count'); |
| 7 | |
| 8 | $({ countNum: $this.text()}).animate({ |
| 9 | countNum: countTo |
| 10 | }, |
| 11 | |
| 12 | { |
| 13 | |
| 14 | duration: 3000, |
| 15 | easing:'linear', |
| 16 | step: function() { |
| 17 | $this.text(Math.floor(this.countNum)); |
| 18 | }, |
| 19 | complete: function() { |
| 20 | $this.text(this.countNum); |
| 21 | //alert('finished'); |
| 22 | } |
| 23 | |
| 24 | }); |
| 25 | |
| 26 | |
| 27 | |
| 28 | }); |