Use $ prefix for jQuery-wrapped DOM objects, don't check if sub-lists are really hidden (ref. rfe #3488640)

This commit is contained in:
Jo Michael 2012-03-18 13:13:18 +01:00
parent d45e74c538
commit fce4f97844

View File

@ -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';