Forum Discussion
MikeImage
9 months agoCommunity Member
Closing the side menu if open using a JavaScript trigger
Is there a way to verify if the menu is open, close it using JavaScript and if it's closed, do nothing?
At the moment I can only toggle it using this JavaScript.
document.querySelector("#hamburg...
MikeImage
Community Member
Do you know if it's possible to Disable the hamburger menu after hiding it using JavaScript? The "TAB" key can still open the menu even if it's not accessible via the mouse.
Jürgen_Schoene_
9 months agoCommunity Member
you can remove the hamburger button from the tab-key sequence with
document.getElementById("hamburger").tabIndex = -1;
and reactivate the old state with
document.getElementById("hamburger").tabIndex = 0;
if you want, you can also deactivate the hamburger menu (without hiding)
document.getElementById("hamburger").style.pointerEvents = "none";
and reactivate with
document.getElementById("hamburger").style.pointerEvents = "";
- MikeImage9 months agoCommunity Member
Works perfectly. Thank you so much for your help. I was able to do exactly what I intended to do because of your help.