I can't get this for the life of me...
I've tried to make a mobile friendly nav that gets hidden if the screen res is less than 600px and a button appears that toggles the menu opacity.
https://jsfiddle.net/ef3mezk5/
Here is the fiddle... I have defined the function at the onclick as simply as possible -
<div class="menu-icon-black" id="menu-icon" onclick="menudrop()">
i am using a separate file that holds the JS engine code here is the portion that is responsible for the menu drop
function menudrop() {
document.getElementById("menu-icon").classList.toggle("change");
document.getElementById("navlist").classList.toggle("show");
}
Uncaught ReferenceError: menudrop is not defined at HTMLDivElement.onclick ((index):169)
And i can see its clearly defined... what is going on here? Can someone please look into this and tell me whats wrong?
