By default the parent element is not visible. However, depending on what is clicked a child element may contain a class named “selected”. How do i test for this class and then if it exists make the whole list visible?
<ul style="display: none;">
<li class="selected">a</li>
<li>b</li>
<li>c</li>
</ul>
Try this
Check FIDDLE