JSFiddle - React, Tailwind, and code Playground

by petroveg

HTML

<script src="//jqueryrotate.googlecode.com/files/jQueryRotate.js"></script>
<div class="rotateimg"></div>

CSS

.rotateimg {
	width: 200px;
	height: 200px;
	background: #369;
}

JavaScript

$(function () {
	var start = 0,
		delta = 60,
		duration = 600;

	$('.rotateimg').rotate({
		bind: {
			click: function () {
				$(this).rotate({
					angle: start,
					animateTo: start + delta,
					duration: duration,
					callback: function () {
						start += delta;
					}
				});
			}
		}
	});
});