Hi there,
I've been looking at the plethora of horizontal accordion scripts on google.
for example: http://www.leigeber.com/2008/05/horizontal-javascript-accordion-menu/ http://www.nyokiglitter.com/tutorials/horizontal.html http://designreviver.com/tutorials/jquery-examples-horizontal-accordion/
All the scripts seem to be made for displaying content in a static width div/element.
I'm trying to make a fairly straight forward navigation menu. When an element in the top-level UL is clicked, the bottom level UL "slides" out, if you click again if closes. I guess I'd have to calculate the widths "dynamically"... not sure how to proceed.
An example would be this:
<style type="text/css">
<!--
ul.menu, ul.menu ul{
list-style: none;
display: inline;
}
ul.menu li, ul.menu ul li {
display: inline;
}
a, a:link, a:hover, a:visited, a:active {
color: black;
text-decoration: none;
}
-->
</style>
<ul class="menu">
<li>
<a href="#">Top-level 1</a>
</li>
<li>
<a href="#">Top-level 2</a>
<ul>
<li><a href="#">Bottom Level A1</a></li>
<li><a href="#">Bottom Level A2</a></li>
<li><a href="#">Bottom Level A3</a></li>
<li><a href="#">Bottom Level A4</a></li>
</ul>
</li>
<li>
<a href="#">Top-level 3</a>
<ul>
<li><a href="#">Bottom Level B1</a></li>
<li><a href="#">Bottom Level B2</a></li>
</ul>
</li>
<li>
<a href="#">Top-level 4</a>
</li>
</ul>