The navigation down the left hand side of my site is getting very long so I want to have opnly the headers visible on page load but then expand each heading to show further links.
Here is the sort of thig I am after
All examples like this one I have found is based upon div tags but the whole left navigation on my site is held in ul and li tags as in the code below
So the first link has no sub level and will go straight to the page.
The click to open does have sub links so open the slider.
I have spent many an hour trying to modify the example to work with my current structure without luck. I know the meaty bit is the getElementsByTagName('DIV'), can someone help please?
Here is the sort of thig I am after
All examples like this one I have found is based upon div tags but the whole left navigation on my site is held in ul and li tags as in the code below
Code:
<ul id="navigation">
<li><a href="go.html" title=''>standard</a></li>
<li class='nochange'><a href="go.html" title=''>Click to open</a>
<ul>
<li><a href="go.html" title=''>sublink</a></li>
</ul>
</li>
<li class='nochange'><a href='' title=''>Click to open</a>
<ul>
<li><a href='go.html'>sub link 1</a></li>
<li><a href='go.html'>sub link 2</a></li>
</ul>
</li>
</ul>
So the first link has no sub level and will go straight to the page.
The click to open does have sub links so open the slider.
I have spent many an hour trying to modify the example to work with my current structure without luck. I know the meaty bit is the getElementsByTagName('DIV'), can someone help please?