If the user opens a collapsed element, all [show] links in the element change to [hide], including the toggle links of nested collapsible elements (code; example—try to close and reopen the outer navbox). It's very confusing as it seems like the nested table has no content. Nested collapsible elements should be excluded from the jQuery selection.
Example: https://en.wikipedia.org/wiki/User:Jdlrobson/T186978