code: function toggleCollapseNav(event, force) {
      var heading = event.target.parentNode;
      var content = heading.nextSibling;
      var inner = content.children[0];
  
      if (heading.className.indexOf('heading') === -1) {
        // Clicked without hitting the right element?
        return;
      }
  
      if (content.style.maxHeight && content.style.maxHeight !== '0px') {
        // Currently showing, so let's hide it, but only if this nav item
        // is already selected. This prevents newly selected items from
        // collapsing in an annoying fashion.
        if (force || window.location.hash && endsWith(event.target.href, window.location.hash)) {
          content.style.maxHeight = '0px';
        }
      } else {
        // Currently hidden, so let's show it
        content.style.maxHeight = inner.offsetHeight + 12 + 'px';
      }
  }
docs: /*
  Collapse or show a navigation menu. It will not be hidden unless it
  is currently selected or `force` has been passed.