I'm diving into the world of jQuery and JavaScript, trying to grasp the ins and outs of the mmenu API. Despite my efforts to understand the libraries, the JavaScript code remains a mystery to me.
Following the tutorial provided on , I successfully created a basic menu. However, I'm struggling to create a button that toggles the menu when clicked. In order to achieve this, I need access to the menu state variable, so I can determine whether to open or close it with the following code:
if(isMenuOpen){API.close();}else{API.open();}
Could someone point me in the right direction to learn about the "menu state variable" for this particular API? Additionally, any tips on navigating APIs like this would be greatly appreciated. I've reviewed the documentation, but as a beginner, it still seems unclear to me. Any guidance on what areas to focus on for study would be immensely helpful.
Many thanks in advance!