From c24fec68b6acafa715ba27c177456a3f23583afd Mon Sep 17 00:00:00 2001 From: John Mulhausen Date: Tue, 31 Jan 2017 17:06:51 -0800 Subject: [PATCH] Move to pre-rendered left-navs instead of post-load JS for TOC sync --- _includes/tree.html | 5 +++-- js/menu.js | 3 --- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/_includes/tree.html b/_includes/tree.html index aae8e36660..85599f73bb 100644 --- a/_includes/tree.html +++ b/_includes/tree.html @@ -1,6 +1,7 @@ -{% for item in tree %}{% if item.heading %}{% else %}{% if item.sectiontitle %}
  • {{ item.sectiontitle }} {% else %} -
  • {{ item.title }}
  • {% endif %}{% endif %}{% endfor %} +
  • {{ item.title }}
  • {% endif %}{% endfor %} diff --git a/js/menu.js b/js/menu.js index 337bc2f105..574820e9db 100644 --- a/js/menu.js +++ b/js/menu.js @@ -56,9 +56,6 @@ function hookupTOCEvents() } return false; }); - $(".currentPage").each(function(){ - $(this).parentsUntil($('.docsidebarnav_section')).addClass("active").removeClass("menu-closed").addClass("menu-open"); - }); $(".left-off-canvas-menu").css("display","block"); // console.log(metadata); $("#st-search-input").on('keyup change', function(e) {