PDA

View Full Version : Chrome CSS Drop Down Menu (v2.01)



nate51
03-13-2008, 08:47 PM
1) Script Title:
Chrome CSS Drop Down Menu (v2.01)

2) Script URL (on DD):
http://dynamicdrive.com/dynamicindex1/chrome/index.htm

3) Describe problem: (revised)
I want to know if it's possible to make this menu into a "multi level menu" and also how to align the top of the drop down menu with the top of my button so that it opens on the right hand side and not the bottom. Reason for using this menu is ease of editing and I need one with an animated in effect.

Thank you for anyones help on this as I am seriously lost here.

-- Nate

ddadmin
03-13-2008, 09:47 PM
Hmm do you actually mean to the right of the anchor element, to be exact, upper right corner of it (similar to Anylink Vertical Menu (http://www.dynamicdrive.com/dynamicindex1/anylinkcss2.htm))?

nate51
03-14-2008, 01:27 PM
Actually I was aiming for upper left, but yes the same idea as my navigation is vertical not horizontal. But I was hoping to do it with this css and java as I am looking for something that seems to animate in rather than just pop in.

nate51
03-17-2008, 03:34 AM
I tried to play with the x and y values on this portion of the code...


dropit:function(obj, e, dropmenuID){
if (this.dropmenuobj!=null) //hide previous menu
this.dropmenuobj.style.visibility="hidden" //hide menu
this.clearhidemenu()
if (this.ie||this.firefox){
obj.onmouseout=function(){cssdropdown.delayhidemenu()}
obj.onclick=function(){return !cssdropdown.disablemenuclick} //disable main menu item link onclick?
this.dropmenuobj=document.getElementById(dropmenuID)
this.dropmenuobj.onmouseover=function(){cssdropdown.clearhidemenu()}
this.dropmenuobj.onmouseout=function(e){cssdropdown.dynamichide(e)}
this.dropmenuobj.onclick=function(){cssdropdown.delayhidemenu()}
this.showhide(this.dropmenuobj.style, e)
this.dropmenuobj.x=this.getposOffset(obj, "left")
this.dropmenuobj.y=this.getposOffset(obj, "top")
this.dropmenuobj.style.left=this.dropmenuobj.x-this.clearbrowseredge(obj, "rightedge")+"px"
this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+1+"px"
this.positionshim() //call iframe shim function
}
},

And it did bring the menu up and to the right but I am aiming for the left and the top of the menu to be lined up with the top of the button.

Can anyone point me in a possible right direction?

nate51
03-17-2008, 03:30 PM
Just keeps getting better....

I just found out I need to make the menus "multi level" if someone can give me a heads up as to if this code is able to be altered to work as a multi level or not then I will figure out if I am continuing with this code or looking for something else.

I need all the help I can get.

Please and Thanks.

-- Nate

nate51
03-17-2008, 06:24 PM
Original question has been revised as I have figure out how to push the menu to the right of the button.

-- Nate

adewolfe
06-04-2008, 03:51 PM
Nate,

Did you ever get anywhere with making this menu multi-level? I too am looking to make this menu multi-level ( with iFrame shim support - multi-level over java applet )

Andy