Assume I have a situation where the HTML below is present and I aim to dynamically conceal all the descendants of the 'overlay' div
<div id="overlay" class="foo">
<h2 class="title">title</h2>
<h1 id="bar">sub-title</h1>
<button id="reset">reset</button>
</div>
Is there an alternative method to collectively hide/show these elements rather than having to call .className = 'hide' on each one individually?
Please be aware that I intend to retrieve them later on, so looping over with .remove() or clearing the div innerHTML is not feasible.