Maytham Alsudany: Menus without JavaScript
This is more of a note to myself since I keep forgetting and "rediscovering" this technique every time I need it, but if it helps you, great! The JavaScript way is to toggle displaying the menu based on a button click. For instance, here's an example in Svelte: [This interactive/preview is only available on the website.] (showMenu = !showMenu)}> {#if showMenu} Hide menu {:else} Show menu {/if} Home Blog Foo Bar But there is a hack to use a hidden checkbox and some CSS to achieve the same thing…