JSFiddle - React, Tailwind, and code Playground

HTML

<div id="myDiv" style="width:100px;height:100px;background-color:red;">
Testing
</div>

<button onclick="changeThings()">Modify</button>
<button onclick="revert()">Revert</button>

JavaScript

var original;
function changeThings()
{
   var myDiv = jQuery("#myDiv");
   original = myDiv.clone().empty();
   myDiv.css({width:"120px",height:"80px","background-color":"blue"});
}
function revert()
{
   var myDiv = jQuery("#myDiv");
   myDiv.after(original.html(myDiv.html())).remove();
}