Do you know how hard is is for me to resist the temptation of getting that pic of grumpy cat saying ‘no.’
But seriously, it depends.
I will assume your dad coded his HTML correctly and am dealing with a navigation menu and not something that should otherwise be a SELECT/OPTION.
You can take advantage of the :target pseudo class.
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width">
<style type="text/css">
#test, #test+div { display:none;}
#test:target, #test:target +div {display:block;}
#test:target { height:4em;overflow:auto; }
</style>
</head>
<body>
<div><a href="#test">link</a></div>
<ul id='test'>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
</ul>
<div><a href="#">close</a>
</body>
</html>
similarly, tho less semantic, you could use a checkbox and :checked as a proper toggle.
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width">
<style type="text/css">
#test +ul { display:none; height:4em;overflow:auto;}
#test:checked + ul {display:block;}
</style>
</head>
<body>
<input id='test' type='checkbox'><ul>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
</ul>
</body>
</html>
However, the ‘selection’ will not close automatically. the user will need to click on another item ( be it another link on the first example , unckeck the checkbox ) or in order to close the window.
Also, both of my preview example should be used with caution as they are not fully cross browser friendly ( tho all current versions of the major browsers provide support )
The effect can be achieved with MINOR bits of JS and some CSS class switching. The part which would be resource intensive, even with JS, for the UA in my opinion is wanting hide the element when the user clicks OUTSIDE the element. onclick events are part of object elements, so they only detect when they happen on the element. that means , even with js, your dad would have to make the script:
- check to see if the window is already open or not ( easy enough, since we are ussing a CSS class, we could check to see if the class is one of the element attributes)
- have the BODY and EVERY other element ( as it’s possible the user could chose to click on a drop down or whatever; anyway the point is I wouldnt feel safe relying on the event bubbling up from the BODY tag) have an onclick event that closes the list element , if it’s open.
Sorry there was no simple answer on this one, anyway I hope that helps