mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-31 17:19:59 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5785 201d5d3c-b55e-5fd7-737f-ddc643e51545
22 lines
649 B
JavaScript
22 lines
649 B
JavaScript
function toggleMenu(evt) {
|
|
var e = new xEvent(evt);
|
|
var obj = e.target;
|
|
if(obj.nodeName != 'BUTTON') return;
|
|
|
|
var node_srl = obj.className.replace(/^menu_/,'');
|
|
if(!node_srl) return;
|
|
|
|
var li_obj = xGetElementById("menu_parent_"+node_srl);
|
|
if(!li_obj) return;
|
|
var className = li_obj.className;
|
|
|
|
if(/nav_tree_off/.test(className)) {
|
|
xInnerHtml(obj,'-');
|
|
li_obj.className = className.replace(/nav_tree_off/,'nav_tree_on');
|
|
} else {
|
|
xInnerHtml(obj,'+');
|
|
li_obj.className = className.replace(/nav_tree_on/,'nav_tree_off');
|
|
}
|
|
}
|
|
|
|
xAddEventListener(document, 'click', toggleMenu);
|