I am trying to learn how to hide <div> sections on a webpage, using javascript getElementsByClassName("<classname>").outerHTML="".
It all works great if the element I am hiding e.g. <div class="someclassname">Some content I want to hide</div>. Or, I have success if using getElementByID("<divId>") if working with e.g. <div id="somedivID">.
The problem is, when wanting to hide a <div> that has no id and when there are multiple names listed for the div's class such as below:
<div class="cake forest carousel">Some content I want to hide.</div>
How can I hide such a div that has not id and no single class name?