Considering the following paragraph and list:
<p id = "list1" onclick = "openList1()">List of Items</p>
<ol>
<li><a href = "/exampleFolder/file1.txt">List Item 1</a></li>
<li><a href = "/exampleFolder/file2.txt">List Item 2</a></li>
<li><a href = "/exampleFolder/file3.txt">List Item 3</a></li>
<li><a href = "/exampleFolder/file4.txt">List Item 4</a></li>
<li><a href = "/exampleFolder/file5.txt">List Item 5</a></li>
</ol>
How can I show and hide this entire list with Javascript?
<script>
function openList1() {
...
}
</script>
I thank you for the attention!