js无限级折叠菜单精简版
无限级折叠菜单 1.01 JS版
无限级折叠菜单 1.0.1 JS版
- 菜单_1_1
- 菜单_2_1
- 菜单_3_1
- 菜单_4_1
- 菜单_5_1
- 菜单_5_2
- 菜单_4_2
- 菜单_5_1
- 菜单_5_2
- 菜单_4_1
- 菜单_3_2
- 菜单_4_1
- 菜单_5_1
- 菜单_5_2
- 菜单_4_2
- 菜单_5_1
- 菜单_5_2
- 菜单_4_1
- 菜单_3_1
- 菜单_2_2
- 菜单_3_1
- 菜单_4_1
- 菜单_5_1
- 菜单_5_2
- 菜单_4_2
- 菜单_5_1
- 菜单_5_2
- 菜单_4_1
- 菜单_3_2
- 菜单_4_1
- 菜单_5_1
- 菜单_5_2
- 菜单_4_2
- 菜单_5_1
- 菜单_5_2
- 菜单_4_1
- 菜单_3_1
- 菜单_2_1
- 菜单_1_2
- 菜单_2_1
- 菜单_3_1
- 菜单_4_1
- 菜单_5_1
- 菜单_5_2
- 菜单_4_2
- 菜单_5_1
- 菜单_5_2
- 菜单_4_1
- 菜单_3_2
- 菜单_4_1
- 菜单_5_1
- 菜单_5_2
- 菜单_4_2
- 菜单_5_1
- 菜单_5_2
- 菜单_4_1
- 菜单_3_1
- 菜单_2_2
- 菜单_3_1
- 菜单_4_1
- 菜单_5_1
- 菜单_5_2
- 菜单_4_2
- 菜单_5_1
- 菜单_5_2
- 菜单_4_1
- 菜单_3_2
- 菜单_4_1
- 菜单_5_1
- 菜单_5_2
- 菜单_4_2
- 菜单_5_1
- 菜单_5_2
- 菜单_4_1
- 菜单_3_1
- 菜单_2_1
(function(e){
for(var _obj=document.getElementById(e.id).getElementsByTagName(e.tag),i=-1,em;em=_obj[++i];){
em.onclick = function(){ //onmouseover
var ul = this.nextSibling;
if(!ul){return false;}
ul = ul.nextSibling; if(!ul){return false;}
if(e.tag != 'a'){ ul = ul.nextSibling; if(!ul){return false;} } //a 标签控制 隐藏或删除该行
for(var _li=this.parentNode.parentNode.childNodes,n=-1,li;li=_li[++n];){
if(li.tagName=="LI"){
for(var _ul=li.childNodes,t=-1,$ul;$ul=_ul[++t];){
switch($ul.tagName){
case "UL":
$ul.className = $ul!=ul?"" : ul.className?"":"off";
break;
case "EM":
$ul.className = $ul!=this?"" : this.className?"":"off";
break;
}
}
}
}
}
}
})({id:'menu',tag:'em'});
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
在线演示 http://demo.jb51.net/js/2011/caidan/index.htm