...

View Full Version : CSS Vertical Drop Down Menu



baraz
09-30-2008, 07:51 PM
Hey everyone, I'm new here, and relatively new to JS.

I'm using the css vertical drop down menu as listed at:

http://www.javascriptkit.com/script/script2/verticalmenu.shtml

I'm trying to cause the menu to expand up instead of down. Anyone able to help out??

dave

vwphillips
10-01-2008, 10:30 AM
function createcssmenu(){
for (var i=0; i<menuids.length; i++){
var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
for (var t=0; t<ultags.length; t++){
var spanref=document.createElement("span")
spanref.className="arrowdiv"
spanref.innerHTML="&nbsp;&nbsp;"
ultags[t].parentNode.getElementsByTagName("a")[0].appendChild(spanref)
ultags[t].parentNode.onmouseover=function(){
this.getElementsByTagName("ul")[0].style.left=this.parentNode.offsetWidth+submenuoffset+"px"
this.getElementsByTagName("ul")[0].style.display="block"
this.getElementsByTagName("ul")[0].style.top=-this.getElementsByTagName("ul")[0].offsetHeight+this.offsetHeight+"px"
}
ultags[t].parentNode.onmouseout=function(){
this.getElementsByTagName("ul")[0].style.display="none"
}
}
}
}

baraz
10-01-2008, 01:51 PM
Perfect VW!

Thankyou kindly!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum