JSFiddle - React, Tailwind, and code Playground

by swesh

HTML

<img id="imgSrc" style="width:100px; height:100px;" src="http://www.hublot.com/images/Dallas.jpg"/>
<div>
<button id="btn">Rotate</button>
</div>

JavaScript

$("#btn").click(function(){
    $('#imgSrc').animate({  textIndent: 0 }, {
    step: function(now,fx) {
      $(this).css('-webkit-transform','rotate('+now+'deg)'); 
    },
    duration:'slow'
},'linear');
});