-
Notifications
You must be signed in to change notification settings - Fork 0
/
ulmenu.js
26 lines (24 loc) · 892 Bytes
/
ulmenu.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
function hoverLI(node){
if (node) {
for (var i=0; i<node.length; i++) {
node[i].onmouseout=function() { hoverSelect('visible'); this.className=this.className.replace(" over", ""); }
node[i].onmouseover=function() { hoverSelect('hidden'); this.className+=" over"; }
}
}
}
function hoverSelect(state) {
var node=document.getElementsByTagName("select");
if (node) for(var i=0;i<node.length;i++) node[i].style.visibility=state;
}
function initULMenu(id) {
// check for IE 7, mozilla, safari, opera 9
if (window.XMLHttpRequest)
return;
// IE6, older browsers
if (document.all && document.getElementById) {
var node = document.getElementById(id);
if (node) hoverLI( node.getElementsByTagName('li') );
}
}
//iemenufix = function() { hoverLI( dcoument.getElementsByTagName('li') ) }
//if (window.attachEvent) window.attachEvent("onload", iemenufix);