JSFiddle - React, Tailwind, and code Playground
HTML
<div class="A"></div>
<div class="B"></div>
CSS
.A{
width:50px;
height:50px;
background-color:#000000;
}
.B{
width:100px;
height:100px;
background-color:#FF0004;
}
.C{
width:150px;
height:150px;
background-color:#12FF00;
}
JavaScript
var test = document.GetElementsByclassName('A'),
test2 = document.GetElementsByclassName('B'),
test.onclick = function(){
test2.document.GetElementsByclassName('C');
}