JSFiddle - React, Tailwind, and code Playground
HTML
<div>
<div id="child" style="background: red; margin: 10px 10px">
content
</div>
</div>
JavaScript
$('#child').parent().css({'background-color':'green','color':'black'});
<div>
<div id="child" style="background: red; margin: 10px 10px">
content
</div>
</div>
$('#child').parent().css({'background-color':'green','color':'black'});