PDA

View Full Version : Anylink CSS Menu - possible to make the menus go up, not down?



jakejones
10-09-2006, 11:06 AM
1) Script Title: Anylink CSS Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/anylinkcss.htm

3) Describe problem: I was wondering if it's possible to make the menus go up instead of down. I tried modifying the script myself, but I couldn't get the positioning right at all.

Thanks for your help,

Jake Jones

ddadmin
10-09-2006, 11:41 PM
Sure, within anylink.js, find the code block:


if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}

and comment out most lines:


//if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
//if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
//edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
//}

This basically tells the menu to always drop up.

jakejones
10-10-2006, 09:44 AM
Perfect. Thank you so much.