PDA

View Full Version : need help with drop down submenus



eurOtec
03-07-2012, 06:43 AM
I am working on a website where I need the drop down menus (as modified based on: http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm ) to have items that expand with another dropown menu to the right (similar to the one under "Resources" "News Related >"shown here:http://www.dynamicdrive.com/dynamicindex1/anylinkcss.htm). As I am not a professional programmer I would need all the help I can get (e.g. a complete sample script based on what I have as shown below).

Thank you.


var menu1={divclass:'anylinkmenu', inlinestyle:'width:100px; background:#C0C0C0', linktarget:''} //First menu variable. Make sure "anylinkmenu1" is a unique name!
menu1.items=[
["Home sample", "/TEST/sample0.shtml"],
["Sample 1", "/TEST/sample.shtml"],
["Sample 2", "/TEST/sample2.shtml"],
["Sample 3", "/TEST/sample3.shtml"],
["CNN report", "/TEST/sample4.shtml"],
["Stemcell story", "/TEST/sample6.shtml"],
["FUNNY", "/TEST/sample5.shtml"] //no comma following last entry!
]



var menu2={divclass:'anylinkmenu', inlinestyle:'width:100px; background:#C0C0C0', linktarget:''} //Second menu variable. Same precaution.
menu2.items=[
["Home sample", "/TEST/sample0.shtml"],
["Sample 1", "/TEST/sample.shtml"],
["Sample 2", "/TEST/sample2.shtml"],
["Sample 3", "/TEST/sample3.shtml"],
["CNN report", "/TEST/sample4.shtml"],
["Stemcell story", "/TEST/sample6.shtml"],
["FUNNY", "/TEST/sample5.shtml"] //no comma following last entry!
]

... and so on

ddadmin
03-07-2012, 07:57 AM
AnyLink JS Drop Down Menu actually already supports dropping to the right of the anchor out of the box already. On the demo page, click on the "Right dropping menu" anchor link example to see it in action.

To get the menu to drop down to the right of the anchor link instead of the default below it, add an extra "rev" attribute inside the anchor with a value of "lr':


<p><a href="http://www.dynamicdrive.com" class="menuanchorclass" rel="anylinkmenu1" rev="lr">Anchor Link</a></p>

Valid values for the "rev" attribute: undefined, rev="up", or rel="lr".

You can define both of the above at the same time obviously.