From f30a1e4de5087b205289022f50b60d5ede8d16c7 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 18 Mar 2015 11:43:08 +0100 Subject: [PATCH] Fix doc TOC height and adapt it on window resize --- public/js/vroom.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/js/vroom.js b/public/js/vroom.js index 5405a2d..7952153 100644 --- a/public/js/vroom.js +++ b/public/js/vroom.js @@ -433,8 +433,12 @@ function initIndex(){ // The documentation page function initDoc(){ + window.onresize = function (){ + $('#toc').width($('#toc').parents().width()); + $('#toc').css('max-height', maxHeight() - 100 + 'px'); + }; $('#toc').width($('#toc').parents().width()); - $('#toc').css('height', maxHeight() - 100 + 'px'); + $('#toc').css('max-height', maxHeight() - 100 + 'px'); $('#toc').toc({ elementClass: 'toc',