css/nav.js

(完整代码) 1KB


<!--//--><![CDATA[//><!--
function menuFix() {
 var sfEls = document.getElementById("nav1").getElementsByTagName("li");
 for (var i=0; i<sfEls.length; i++) {
  sfEls[i].onmouseover=function() {
  this.className+=(this.className.length>0? " ": "") + "sfhover";
  }
  sfEls[i].onMouseDown=function() {
  this.className+=(this.className.length>0? " ": "") + "sfhover";
  }
  sfEls[i].onMouseUp=function() {
  this.className+=(this.className.length>0? " ": "") + "sfhover";
  }
  sfEls[i].onmouseout=function() {
  this.className=this.className.replace(new RegExp("( ?|^)sfhover\\b"),"");
  }
 }
}
//--><!]]>
	
function menuFix2() {
var sfEls = document.getElementById("leftnav").getElementsByTagName("li");
for (var i=0; i<sfEls.length; i++) {
	if(sfEls[i].parentNode.id=='leftnav'){		
		sfEls[i].onclick=function() {			
			if(this.className.indexOf('show')>-1){
				this.className=this.className.replace(new RegExp("( ?|^)show\\b"), "");
			}
			else{
				this.className+=(this.className.length>0? " ": "") + "show";				
			}			
			for(var j=0;j<sfEls.length;j++){				
				if(sfEls[j]!=this)sfEls[j].className=sfEls[j].className.replace(new RegExp("( ?|^)show\\b"), "");
			}
		}		
	}
	else{
		sfEls[i].onmouseover=function() {
		this.className+=(this.className.length>0? " ": "") + "show";
		}
		sfEls[i].onmouseout=function() {
		this.className=this.className.replace(new RegExp("( ?|^)show\\b"), "");
		}
}
}
}

window.onload=function (){
	menuFix();
	menuFix2();
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。