JSFiddle - React, Tailwind, and code Playground
by thespacebean
HTML
<div id="thediv" style="left: 20px">
<div class="someclass" style="left: 5px">Here is some text to move</div>
</div>
<div id="right"></div>
CSS
#thediv {
background-color: red;
padding: 20px;
}
#right {
background-color: blue;
padding: 20px;
}
JavaScript
$("#thediv").children(".someclass").each(function () {
alert('#thediv left: '+ $(this).parent().css("left"));
alert('.someclass left: '+$(this).css("left"));
// move the element to another div
$("#right").append($(this));
});