Here is the HTML code I am working with:
<div class = "touch" onclick="do(this)">
<span>text01</span>
<span>text02</span>
<span>text03</span>
<span>text04</span>
<div class = "findMe">andHideMe</div>
</div>
<div class = "touch" onclick="do(this)">
<span>text01</span>
<span>text02</span>
<div class = "findMe">andHideMe</div>
</div>
<div class = "touch" onclick="do(this)">
<span></span>
<span>just</span>
<div class = "findMe">andHideMe</div>
</div>
Upon clicking on TOUCH, I want to manipulate the 'FindMe' DIV element.
How can I target and manipulate the 'FindMe' element within the clicked TOUCH div using JavaScript?
function do(obj)
{
var se = obj.childNodes;
for (var t = 0; t < obj.childNodes.length; t++)
{
if (se[t].className == 'findMe')
{
se[t].className.style.display = 'none';
};
}
}