forked from smicroz/einDa-skin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
visibility.js
31 lines (28 loc) · 828 Bytes
/
visibility.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
27
28
29
30
31
function set_expand_visible(toggle_name, vis_name)
{
var vis_element = document.getElementById(vis_name);
var toggle_element = document.getElementById(toggle_name);
vis_element.style.display = '';
toggle_element.innerHTML = "-";
toggle_element.className = "expand_toggle_neg";
}
function set_expand_hidden(toggle_name, vis_name)
{
var vis_element = document.getElementById(vis_name);
var toggle_element = document.getElementById(toggle_name);
vis_element.style.display = 'none';
toggle_element.innerHTML = "+";
toggle_element.className = "expand_toggle_plus";
}
function toggle_expand(toggle_name, vis_name)
{
var vis_element = document.getElementById(vis_name);
if (vis_element.style.display == 'none')
{
set_expand_visible(toggle_name, vis_name);
}
else
{
set_expand_hidden(toggle_name, vis_name);
}
}