JSFiddle - React, Tailwind, and code Playground

by Abid Shaik

HTML

<script type="text/javascript" src="http://beneposto.pl/jqueryrotate/js/jQueryRotateCompressed.js"></script>
<div id="imagesDiv">
<img src="https://www.google.com/images/srpr/logo3w.png" id="image">
<img src = "https://cdn0.iconfinder.com/data/icons/arrows-volume-6/48/347-128.png" id="rotate">    
    </div>

CSS

#imagesDiv{
    position:relative;
}
#image{
  margin:50px 50px;
}
#rotate{
    width:30px;
    height:30px;
    position:absolute;
    top:30px;
}

JavaScript

/*Another jQuery Rotate Plugin on Click event*/
$("#image").rotate({ 
  
});

$("#rotate").click(function(){
    var currentVal = $("#image").getRotateAngle(); 
	
    
    if(currentVal[0] >= 360) 
    {
        currentVal[0] = 0; 
    }
    
    $("#image").rotate({angle: currentVal[0] +  15}); 
    
    console.log($("#image").getRotateAngle()); 
});