Use $ prefix for jQuery-wrapped DOM objects, don't check if sub-lists are really hidden (ref. rfe #3488640)
This commit is contained in:
parent
d45e74c538
commit
fce4f97844
@ -35,10 +35,10 @@ function toggle(id, only_open)
|
||||
img.alt = '-';
|
||||
}
|
||||
// if only one sub-list, open as well
|
||||
var submenus = $(el).find("> li > ul:hidden");
|
||||
var sublinks = $(el).find("> li > a.item, > li > a.tableicon");
|
||||
if (submenus.length == 1 && sublinks.length == 0) {
|
||||
toggle(submenus.prop("id").split("subel").join(""), true);
|
||||
var $submenus = $(el).find("> li > ul");
|
||||
var $sublinks = $(el).find("> li > a.item, > li > a.tableicon");
|
||||
if ($submenus.length == 1 && $sublinks.length == 0) {
|
||||
toggle($submenus.prop("id").split("subel").join(""), true);
|
||||
}
|
||||
} else {
|
||||
el.style.display = 'none';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user