I have a navigation panel on the right side of my website and the links are set up using ul. What I want is to be able to do is make sub-links that show up when i click on on of the links. For example, say I have 10 links labeled Link 1, Link 2, Link 3, Link 4, etc... and I have 5 sub-links that I want under one of these 10 Links. I want the sub-links to show up only when someone is to click on the link. Say I want link 1 to have these 5 sub-links.
This is what the navigation panel would look like before Link 1 is expanded.
Code:
Link 1
Link 2
Link 3
Link 4
Link 5
etc...
The links would look like this once expanded.
Code:
Link 1
sub-link 1
sub-link 2
sub-link 3
sub-link 4
sub-link 5
Link 2
Link 3
Link 4
Link 5
etc...
I have seen some sites where you can copy and paste the code but then I can't edit them the way I want. If someone could give me instructions on how to do this I would greatly appreciate it.
If it helps the current set up for my links is like this
Code:
<ul>
<li>Link 1</li>
<ul>
<li>sub-link 1</li>
<li>sub-link 2</li>
<li>sub-link 3</li>
<li>sub-link 4</li>
<li>sub-link 5</li>
<li>Link 2</li>
<li>Link 3</li>
<li>Link 4</li>
<li>Link 5</li>
<li>etc...</li>
</ul>