JSFiddle - React, Tailwind, and code Playground
HTML
<div id="box">
<img src="/img/logo.png" alt="logo">
</div>
CSS
div{
background: blue;
width: 200px;
height: 50px;
}
JavaScript
var x = 1;
function rotate() {
var angle = (90 * x);
$(this).css("-moz-transform", "rotate(" + angle + "deg)");
x++;
if (x > 4) x = 0;
}
$("#box").click(rotate);