JSFiddle - React, Tailwind, and code Playground
by TJ VanToll
HTML
<link href="http://code.jquery.com/ui/jquery-ui-git.css" rel="stylesheet" />
<script src="http://code.jquery.com/jquery-git.js"></script>
<script src="http://code.jquery.com/ui/jquery-ui-git.js"></script>
<div id="parent">
<div id="child"></div>
</div>
CSS
#parent {
width: 200px;
height: 200px;
background: red;
}
#child {
width: 16px;
height: 16px;
background: black;
}
JavaScript
//Note the difference of using "50%" and "50.0%".
$("#child").position({
my: "center center",
at: "center center+50.0%",
of: $("#parent")
});