jquery结合GASP数字动画插件 Animated Counter Plugin With jQuery And GSAP

示例

Animate to

$('.counter-demo-1').lemCounter({
  value_to: 100
});						
					
100

Animate from to

$('.counter-demo-2').lemCounter({
value_to: 100,
value_from: 200
});						
			
100

Value to from content

$('.counter-demo-3').lemCounter({
  value_to_from_content: true
});					
				
100

Settings from data attribute

$('.counter-demo-4').lemCounter();

<div
class="counter-demo-4"
data-lem-counter='{"value_from": 100000, "value_to": 1000, "animate_duration": 3, "locale": "en-US"}'>1,000
</div>				
				
1,000

事件:onComplete

$('.counter-event-demo-5').lemCounter({
  value_to: 100
});
$('.counter-event-demo-5').on('onComplete.lc', function () {
  $(this).css('color', 'red');
});				
				
100