onclick help

Discussion in 'JavaScript' started by Divvy, Aug 25, 2005.

  1. #1
    Hi guys!
    I am using this code in my phpBB menu.
    But I need help...
    The menu opens with mouse over and I need to open with onclick

    Can someone help me please? :)

    
    function init() {
    if (document.all&&document.getElementById) {
    navRoot = document.getElementById("dmenu");
    for (i=0; i<navRoot.childNodes.length; i++) {
    node = navRoot.childNodes[i];
    if (node.nodeName=="LI") {
    node.onmouseover=function() {
    this.className+=" over";
    }
    node.onmouseout=function() {
    this.className=this.className.replace(" over", "");
    }
    }
    }
    }
    
    } 
    
    Code (markup):
    Thanks and sorry for my bad english hehe
     
    Divvy, Aug 25, 2005 IP