JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://github.com/louisremi/jquery.transform.js/raw/master/jquery.transform2d.js"></script>
<div id="wrapper"><div id="test"></div></div>

CSS

/* a wrapper twice as large and high will allow using 
corners of the inner element as fake transform-origins */
#wrapper {
    position: relative;
    width: 60px;
    height: 60px;
}
#test {
    width: 30px;
    height: 30px;
    background: red;
    /* uncomment the following to use top left corner as origin
    position: absolute;
    bottom: 0;
    right: 0;*/
}

JavaScript

$("#wrapper").animate({transform: "rotate(360deg)"});