if I have this html code:
<span id="folder1"> hello 1 </span>
<span id="folder2"> hello 2 </span>
<span id="folder3"> hello 3 </span>
<a href="JavaScript:show(1)">Show / hide 1</a>
<a href="JavaScript:show(2)">Show / hide 2</a>
<a href="JavaScript:show(3)">Show / hide 3</a>
how do I simpliest write the JS code?
this is what I know, (dummy code)
folder1.style.visibility = "visible";
but how do I use something like this
folder[num].style.visibility = "visible"; ???
My codes look like something a kid wrote
I have absolutely no idea what I am talking about
Somehow I still manage to make it work
<span id="folder1"> hello 1 </span>
<span id="folder2"> hello 2 </span>
<span id="folder3"> hello 3 </span>
<a href="JavaScript:show(1)">Show / hide 1</a>
<a href="JavaScript:show(2)">Show / hide 2</a>
<a href="JavaScript:show(3)">Show / hide 3</a>
how do I simpliest write the JS code?
this is what I know, (dummy code)
folder1.style.visibility = "visible";
but how do I use something like this
folder[num].style.visibility = "visible"; ???
My codes look like something a kid wrote
I have absolutely no idea what I am talking about
Somehow I still manage to make it work