JSFiddle - React, Tailwind, and code Playground
HTML
<div id="top">
<div id="potato"></div>
</div>
<div id="bottom">
<div id="potato"></div>
</div>
CSS
div {
width: 100%;
height: 50px;
background-color: #555;
border: 1px solid black;
}
#potato {
width: 200px;
}
.Red {
background-color: red;
}
.Russet {
background-color: #80461B;
}
JavaScript
$('#top #potato').addClass('Russet');
$('#bottom #potato').addClass('Red');
//$('#top > #potato').addClass('Russet');
//$('#bottom > #potato').addClass('Red');
// $('#potato').html('Idaho');