HEX
Server: Apache
System: Linux www3.pit.tblive.com 5.14.0-687.38.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Aug 12 17:19:12 EDT 2026 x86_64
User: awaldron (1020)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/awaldron/_upmc/thyrointl.alanwaldron.com/js/toggle-sidemenu.js
const clickDiv = document.getElementById('mobile-nav-toggle');
const topBar = document.getElementById('top-bar');
const middleBar = document.getElementById('middle-bar');
const bottomBar = document.getElementById('bottom-bar');
const bodyWrapper = document.getElementById('body-wrapper');
const bodyOverlay = document.getElementById('body-overlay');
const sideNav = document.getElementById('side-nav');

const toggleSidemenu = () => {
	topBar.classList.toggle('top-bar-rotated');
	middleBar.style.opacity = middleBar.style.opacity === '0' ? '1' : '0';
	bottomBar.classList.toggle('bottom-bar-rotated');
	bodyWrapper.classList.toggle('body-wrapper-open');
	bodyOverlay.classList.toggle('body-overlay-open');

	window.scrollTo({ top: 0, behavior: 'instant' });

	document.body.style.overflow =
		document.body.style.overflow === 'hidden' ? '' : 'hidden';

	console.log('zindex:', sideNav?.style.getPropertyValue('z-index'));

	sideNav.style.zIndex =
		sideNav.style.zIndex === '' || sideNav.style.zIndex == '-1'
			? '0'
			: '-1';
};

// Add event listener for click
clickDiv.addEventListener('click', toggleSidemenu);
bodyOverlay.addEventListener('click', toggleSidemenu);