JSFiddle - React, Tailwind, and code Playground
HTML
<img class='crossRotate' src="http://i.imgur.com/veWks0T.png" alt="" />
CSS
img {
display: block;
margin: 20px;
}
img {
-webkit-transition-duration: 0.5s;
-moz-transition-duration: 0.5s;
-o-transition-duration: 0.5s;
transition-duration: 0.5s;
-webkit-transition-property: -webkit-transform;
-moz-transition-property: -moz-transform;
-o-transition-property: -o-transform;
transition-property: transform;
}
JavaScript
$( ".crossRotate" ).click(function() {
//alert($( this ).css( "transform" ));
if ( $( this ).css( "transform" ) == 'none' ){
$(this).css("transform","rotate(36deg)");
} else {
$(this).css("transform","rotate(72deg)" );
}
});