JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://www.snorkl.tv/dev/libs/greensock/TweenMax.min.js"></script>
<script src="http://www.snorkl.tv/dev/libs/greensock/plugins/ColorPropsPlugin.min.js"></script>
<p id="output">0</p>
<button id="increase">increase</button>
<button id="decrease">decrease</button>
JavaScript
TweenPlugin.activate([RoundPropsPlugin]);
var output = $("#output"),
countIncrement=100,
countMultiplier=0,
obj = {
displayValue:0
};
function tweenValue(){
var newValue = countMultiplier * countIncrement;
TweenMax.to(obj, 1, {displayValue:newValue, roundProps:"displayValue", ease:Expo.easeOut, onUpdate:updateUI});
}
function updateUI() {
output.html(obj.displayValue);
}
$("#increase").click(function(){
countMultiplier++;
tweenValue();
})
$("#decrease").click(function(){
countMultiplier--;
tweenValue();
})