As someone new to the world of web development, I am facing a challenge with creating a drop-down menu that transitions out of sight. Currently, I have an onclick="showMenu()
and onclick="hideMenu()
which are linked to the following script:
function showMenu() {
navLinks.style.right = "0";
console.log("Show");
}
function hideMenu() {
navLinks.style.right = "-200px important";
console.log("Hide");
}
The hideMenu() function seems to be ineffective because it is being overwritten, and I am uncertain how or why this is happening.
What steps can I take to either overwrite or disable this?