This repository has been archived on 2026-10-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
inside/js/menuExpandable3.js
T
nikolark 52cc657538 Major cleanups
* Structures static file locations
* Moves index.php to /
* Updates paths all over
* Hides menu items of unused features
* Hides menu items of legacy features
* Adds README
2012-04-20 23:45:21 +02:00

40 lines
1.1 KiB
JavaScript

/*
* menuExpandable3.js - implements an expandable menu based on a HTML list
* Author: Dave Lindquist (http://www.gazingus.org)
*/
if (!document.getElementById){
document.getElementById = function() {
return null;
}
}
function initializeMenu(menuId, actuatorId) {
var menu = document.getElementById(menuId);
var actuator = document.getElementById(actuatorId);
if (menu == null || actuator == null){
return;
}
actuator.parentNode.style.backgroundImage = "url(../graphics/plus.png)";
actuator.onclick = function() {
var display = menu.style.display;
this.parentNode.style.backgroundImage =
(display == "block") ? "url(../graphics/plus.png)" : "url(../graphics/minus.png)";
menu.style.display = (display == "block") ? "none" : "block";
return false;
}
}
function menuExpandCurrentSection(menuId){
var menu = document.getElementById(menuId);
if (menu == null){
return;
}
menu.parentNode.style.backgroundImage = "url(../graphics/minus.png)";
menu.style.display = "block";
}