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>
<div class="box" id="b1"></div>
<input type="button" id="button" value="restart()">
CSS
.box{
background-color:green;
width:50px;
height:50px;
margin:10px;
position:relative;
}
JavaScript
var element = document.getElementById('b1');
var button = document.getElementById('button');
timeline = new TimelineMax();
timeline.append(TweenMax.fromTo(element, 2, {rotation:270, scale:0.5, transformOrigin:"50px 20px"}));
TweenLite.to();
button.onclick = function(){
timeline.restart();
}