JSFiddle - React, Tailwind, and code Playground
HTML
<div id="product8" class="product disabled">
DIV 1
<div class="icon" > icon 1 </div>
<div class="content" >
<div class="title" > 3 </div>
<span class="price" > 4 </span>
<div class="title owned" >
107
</div>
</div>
</div>
JavaScript
'var doc = document.getElementById("product8");
'alert(doc.getElementsByClassName("title owned"));
e = document.getElementsByClassName("product disabled");
for(var i = 0; i < e.length; i++) {
// Only if there is only single class
'if(e[i].className == 'item') {
// Do something with the element e[i]
' alert(e[i].className);
'}
alert(e[i].className);
}