PDA

View Full Version : Anylink JS Drop Down Menu: Position & Link Styling



dmwhipp
09-09-2010, 10:03 PM
1) Script Title: Anylink JS Drop Down Menu

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

3) Describe problem: I need help getting the pop out menus to move over and down a few pixels and help styling the the pop-out menu hyperlinks (link, active, visited and hover)

Here is my test page: http://www.floridacompact.org/index3.html

I found the following code in the .js file:

menu.dropmenu.setcss({left:posx+'px', top:posy+'px', visibility:'visible'})

It seems tweaking that would help with the pop-out positioning, but everything I tried resulted in the menu no longer working.

UPDATE:

I added the following code to the css and the link colors appear to working the way my client would like:

.anylinkmenu a{ /*link background color*/
background: #fff;
color: #a30134;
}

.anylinkmenu a:hover{ /*hover background color*/
background: #fff;
color: #6bd7d0;
}

But I still can't figure out the positioning...


Thanks,
Deborah

ddadmin
09-11-2010, 10:09 PM
I need help getting the pop out menus to move over and down a few pixels...

You should be able to do this by editing the line you quoted above inside the script, plus another line. Lets say you want to offset the menu 15px to the right and down; you'd make the following changes in red inside the .js file:


menu.dropmenu.setcss({left:posx+15+'px', top:posy+15+'px', visibility:'visible'})

and


menu.shadow.setcss({left:posx+anylinkmenu.effects.shadow.depth[0]+15+'px', top:posy+anylinkmenu.effects.shadow.depth[1]+15+'px', visibility:'visible'})

dmwhipp
09-11-2010, 11:12 PM
Thanks you... I was omitting the second + sign, but it's working perfectly.
Thanks again,
Deborah