renovations

This commit is contained in:
Ilya Kantor 2015-02-08 10:03:24 +03:00
parent e1d099ae97
commit 53d9080aad
50 changed files with 653 additions and 471 deletions

View file

@ -95,12 +95,12 @@ tree.onclick = function(event) {
var li = target.parentNode; // получить родительский LI
// получить UL с потомками -- это первый UL внутри LI
var node = li.getElementsByTagName('ul')[0];
var childrenContainer = li.getElementsByTagName('ul')[0];
if (!node) return; // потомков нет -- ничего не надо делать
if (!childrenContainer) return; // потомков нет -- ничего не надо делать
// спрятать/показать (можно и через CSS-класс)
node.style.display = node.style.display ? '' : 'none';
childrenContainer.hidden = !childrenContainer.hidden;
}
```