Im sure that this will seriously be easy for one of you guys, but i am just no good with javascript (and more to the point the node hierarchy of html/xml)
Here is a javascript menu i sourced from www.javascriptkit.com
Expand|Select|Wrap|Line Numbers
- var menuids=new Array("leftmenu") //Enter id(s) of UL menus, separated by commas
- var submenuoffset=-2 //Offset of submenus from main menu. Default is -2 pixels.
- 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=" "
- 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"}
- ultags[t].parentNode.onmouseout=function(){
- this.getElementsByTagName("ul")[0].style.display="none"
- }
- }
- }
- }
- if (window.addEventListener)
- window.addEventListener("load", createcssmenu, false)
- else if (window.attachEvent)
- window.attachEvent("onload", createcssmenu)
Now i know how everyone (me too) hates people just asking without trying to write some code. But believe me i have tried, unsuccessfuly. I just seriously suck at this type of coding. I am sorry :(.
If anyone can help that would be fantastic - please .
Thanks alot everyone.