JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://jqueryrotate.googlecode.com/svn/trunk/jQueryRotate.js"></script>
<img id="img" src="https://www.google.com/images/srpr/logo3w.png">

CSS

#img { margin:100px 100px;}

JavaScript

$("#img").rotate({ 
   bind: 
     { 
        click : function() { 
            $(this).rotate({animateTo:180})
        },
        mouseleave : function() { 
            $(this).rotate({animateTo:0})
        }
     } 

});