From ebddad5d26614a5fa2abf5edc41cfceec5c489b5 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Sat, 19 Sep 2020 21:21:35 +0200 Subject: [PATCH] [doc] Fix sidebar quirks --- docs/_includes/head.html | 2 +- docs/js/customscripts.js | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/_includes/head.html b/docs/_includes/head.html index c1e251d961..63f23e1789 100644 --- a/docs/_includes/head.html +++ b/docs/_includes/head.html @@ -22,7 +22,7 @@ - + diff --git a/docs/js/customscripts.js b/docs/js/customscripts.js index 35e53e155b..b1fca27328 100644 --- a/docs/js/customscripts.js +++ b/docs/js/customscripts.js @@ -1,16 +1,16 @@ - -$('#mysidebar').height($(".nav").height()); - - $( document ).ready(function() { - //this script says, if the height of the viewport is greater than 800px, then insert affix class, which makes the nav bar float in a fixed - // position as your scroll. if you have a lot of nav items, this height may not work for you. + $('#mysidebar').height($(".nav").height()); + + // this script says, if the height of the viewport is greater than 800px, then insert position-fixed class, + // which makes the nav bar float in a fixed position as your scroll. If you have a lot of nav items, + // this height may not work for you. var h = $(window).height(); //console.log (h); if (h > 800) { - $( "#mysidebar" ).attr("class", "nav affix"); + $( "#mysidebar" ).attr("class", "nav position-fixed"); } + // activate tooltips. although this is a bootstrap js function, it must be activated this way in your theme. $('[data-toggle="tooltip"]').tooltip({ placement : 'top'