am 502c939f: docs: add support for an infinite number of nested lists in side nav

* commit '502c939f6d0818d985a45ca54e35c0a3efa1470b':
  docs: add support for an infinite number of nested lists in side nav
This commit is contained in:
Scott Main 2012-11-27 15:09:17 -08:00 committed by Android Git Automerger
commit 1aace7da06
2 changed files with 7 additions and 6 deletions

View file

@ -320,7 +320,7 @@ video.with-shadow {
background: transparent; }
#nav li.expanded li ul {
/* 3rd level ul */
padding:0 10px;
padding:0 0 0 10px;
}
#nav li.expanded > .nav-section-header:after {
content: '';

View file

@ -138,12 +138,13 @@ $(document).ready(function() {
var $selListItem;
if ($selNavLink.length) {
$selListItem = $selNavLink.closest('li');
$selListItem.addClass('selected');
$selListItem.closest('li.nav-section').addClass('expanded');
$selListItem.closest('li.nav-section').children('ul').show();
$selListItem.closest('li.nav-section').parent().closest('li.nav-section').addClass('expanded');
$selListItem.closest('li.nav-section').parent().closest('ul').show();
// Traverse up the tree and expand all parent nav-sections
$selNavLink.parents('li.nav-section').each(function() {
$(this).addClass('expanded');
$(this).children('ul').show();
});
// $selListItem.closest('li.nav-section').closest('li.nav-section').addClass('expanded');