Team:Bordeaux/NotebookTest
From 2014.igem.org
(Difference between revisions)
Line 241: | Line 241: | ||
function hide(thingId) | function hide(thingId) | ||
{ | { | ||
+ | var isEmpty = "False"; | ||
var targetElement; | var targetElement; | ||
targetElement = document.getElementById(thingId); | targetElement = document.getElementById(thingId); | ||
var parentElement = targetElement.parentNode; | var parentElement = targetElement.parentNode; | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
if (targetElement.style.visibility == "hidden") | if (targetElement.style.visibility == "hidden") | ||
{ | { | ||
targetElement.style.visibility = "" ; | targetElement.style.visibility = "" ; | ||
+ | if (parentElement.style.display == "none") | ||
+ | { | ||
+ | parentElement.style.display = "" ; | ||
+ | } | ||
} | } | ||
else | else | ||
{ | { | ||
targetElement.style.visibility = "hidden" ; | targetElement.style.visibility = "hidden" ; | ||
+ | var childs = parentElement.childNodes; | ||
+ | alert(childs.join("")); | ||
+ | for (var i = 0; i < childs.length; i++){ | ||
+ | |||
+ | if (childs[i].style.visibility == ""){ | ||
+ | isEmpty = "True"; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | if (isEmpty == "False"){ | ||
+ | parentElement.style.display = "none" ; | ||
+ | } | ||
+ | |||
} | } | ||
} | } |
Revision as of 21:06, 15 September 2014
May 2014
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday
1
2
3
4
5
dot
6
dot
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
...