PDA

View Full Version : Chrome CSS Drop Down Menu - small tweak



Berserk
04-18-2006, 07:05 AM
i would like to tweak the "Chrome CSS Drop Down Menu" so that the menu dosnt disapear on a click.

http://www.dynamicdrive.com/dynamicindex1/chrome/index.htm

ie. an image without a link, that u can click on but the menu stays up.

thats not what i want to do with it, but thats what i want the menu to do, for all links i guess.

so if u could post it modded like that, or tell me what to change to do that, i would be grateful :)


EDIT: figured it out myself :)


in the javascript file called "chrome":


return edgeoffset
},

dropit:function(obj, e, dropmenuID){
if (this.dropmenuobj!=null) //hide previous menu
this.dropmenuobj.style.visibility="hidden"
this.clearhidemenu()
if (this.ie||this.firefox){
obj.onmouseout=function(){cssdropdown.delayhidemenu()}
this.dropmenuobj=document.getElementById(dropmenuID)
this.dropmenuobj.onmouseover=function(){cssdropdown.clearhidemenu()}
this.dropmenuobj.onmouseout=function(){cssdropdown.dynamichide(e)}
this.dropmenuobj.onclick=function(){cssdropdown.delayhidemenu()}
this.showhide(this.dropmenuobj.style, e, "visible", "hidden")
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"
}
},


u just remove the line:

this.dropmenuobj.onclick=function(){cssdropdown.delayhidemenu()}