From e08152ed03639cfa0592678840b4b8d0b98aa19b Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Sun, 14 Aug 2016 11:24:04 +0800 Subject: Update toc styles to make toc menu always accessible without scrolling --- public/js/extra.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'public/js/extra.js') diff --git a/public/js/extra.js b/public/js/extra.js index 40496967..824b78d1 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -595,6 +595,7 @@ function generateToc(id) { }); if (target.text() == 'undefined') target.html(''); + var tocMenu = $('
Expand all'); var backtotop = $('Back to top'); var gotobottom = $('Go to bottom'); @@ -619,7 +620,8 @@ function generateToc(id) { scrollToBottom(); removeHash(); }); - target.append(toggle).append(backtotop).append(gotobottom); + tocMenu.append(toggle).append(backtotop).append(gotobottom); + target.append(tocMenu); } //smooth all hash trigger scrolling -- cgit v1.2.3