PDA

View Full Version : Accordion Menu Click to open AND go to new page?



Buntina
03-05-2008, 09:48 AM
1) Script Title: Glossy Accordion Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ddaccordionmenu.htm

3) Describe problem:
Not really a problem as such - a slight mod, when the headers are collapsed and showing a plus sign the user clicks on the header and it opens to show all sub menu items - is it also possible that when the user clicks on this header that not only does the menu open but the click takes the user to a different page?

Example in my html i have this as the header code:

<a class="menuitem submenuheader" class="menuitem" href="historique.htm">la societe</a>

<div class="submenu">
<ul>
<li><a href="credits.htm">credits</a></li>
<li><a href="termes-et-conditions.htm">termes</a></li>
</ul>
</div>

So when a user clicks on "la societe" I want the menu to open and the user to go to historique.htm

Is that possbile?

TIA
Mike

Buntina
03-05-2008, 02:30 PM
No worries -sorted

yuchien
03-06-2008, 04:07 AM
What is the solution? can you share it please. thanks

Buntina
03-06-2008, 07:49 AM
whats the answer? complicated, you need to end up with something like this:

<a class="menuitem" href="usinage-numerique_37.htm">numérique</a>
<a class="submenuheader" href="usinage-numerique_37.htm">&nbsp;</a>
<div class="submenu">
<ul>
<li><a href="machines-commandes-numerique_38.htm">commande numérique</a></li>
<li><a href="electroerosion-au-fil_39.htm">electroérosion</a></li>

<li><a href="grand-volume_40.htm">grand volume</a></li>
</ul>
</div>

Note the 'submenuheader' - this is where the 'PLUS' sign appears, so the actual header is a link to the page but the PLUS sign expands the list of sub pages

You also need to apply a bit of radical styling in the css to make it look right

HTH

Mike