16 document.getElementById(
"mySidebar").style.width =
"300px";
17 document.getElementById(
"main").style.marginLeft =
"125px";
21 document.getElementById(
"mySidebar").style.width =
"0";
22 document.getElementById(
"main").style.marginLeft=
"0";
27 var sidebarOpen =
false;
28 const openBtn = $(
'#openSubmenuBtn');
29 const sidebar = $(
'#mySidebar');
30 var showOpenBtnPositionThreshold = 600;
35 openBtn.click(
function()
44 var overlapPositionOrDivBox = $(
'#globalmenu');
47 $(
window).scroll(
function()
49 var overlapPosition = overlapPositionOrDivBox.offset().top + overlapPositionOrDivBox.outerHeight();
51 var sidebarCollider = sidebar.offset().top + sidebar.outerHeight();
53 var thisSidebar = document.getElementById(
"mySidebar");
56 if (overlapPosition >= sidebarCollider) {
58 thisSidebar.style.width=
"0px";
62 let scrollPosition = $(
window).scrollTop();
65 if (scrollPosition >= showOpenBtnPositionThreshold) {