JSFiddle - React, Tailwind, and code Playground

HTML

<img src="http://jsfiddle.net/img/logo.png" class="cboxPhoto"/>
<button id="cboxRight">Right</button>
<button id="cboxLeft">Left</button>

CSS

.cboxPhoto {
    background-color: black;
}

JavaScript

$(function() {
        var degrees = 0;
    $("#cboxRight").on('click', function () {
        var $cboxphoto = $('.cboxPhoto');
        degrees += 90;
        $cboxphoto.css('-ms-transform', 'rotate(' + degrees + 'deg)');
        $cboxphoto.css('-webkit-transform', 'rotate(' + degrees + 'deg)');
        $cboxphoto.css('transform', 'rotate(' + degrees + 'deg)');
    });

    $("#cboxLeft").on('click', function () {
        var $cboxphoto = $('.cboxPhoto');
        degrees -= 90;
        $cboxphoto.css('-ms-transform', 'rotate(' + degrees + 'deg)');
        $cboxphoto.css('-webkit-transform', 'rotate(' + degrees + 'deg)');
        $cboxphoto.css('transform', 'rotate(' + degrees + 'deg)');
    });
});