diff --git a/theme/src/main/assets/assets/javascripts/groups.js b/theme/src/main/assets/assets/javascripts/groups.js index fb072e6..65614b5 100644 --- a/theme/src/main/assets/assets/javascripts/groups.js +++ b/theme/src/main/assets/assets/javascripts/groups.js @@ -152,13 +152,9 @@ $(function() { $(".toc").each(function() { var tocRoot = $(this); function findHeaderElements(element) { - var headerElements = element.find(".header"); + var headerElements = element.find(".header").filter("a"); headerElements.each(function() { var headerElement = $(this); - // only work with the header link - if (!headerElement.is("a")) { - return false; - } // if header hiding by group switch, hide they li parent // otherwise display there li parent if (headerElement.css("display") === "none" ) { @@ -181,7 +177,7 @@ $(function() { } findHeaderElements(tocRoot); - }) + }) groupChangeListeners.forEach(listener => listener(group, supergroup, catalog)); }