Quote:
function hideMenu(){
navLinks.style.right ="-200";
}
You haven't specified a unit for that value. The browser doesn't know what
-200
is supposed to represent.
Change it to match your CSS declaration:
function hideMenu(){
navLinks.style.right ="-200px";
}
Alternatively, change your Javascript to toggle a CSS class on the element, and use CSS to style the element based on the presence or absence of that class.