I'm trying to make a menu, but when I have tried to execute the code in Chrome I've got an error.
So for debug proposes I made a button:
<input type="button" style="position: fixed; left:0; bottom:0; width:50px; height:25px;" value="test" onclick="login('logf')" />
This is the function where error is:
var loginshow = false;
function login(c)
{
e = document.getElementsByClassName(c);
if(loginshow)
{
e.style.height = "0";
}
else
{
e.style.height = "110px";
}
loginshow=!loginshow;
}
The error from google chrome:
bar.js:13 Uncaught TypeError: Cannot set property 'height' of undefined
at login (bar.js:13)
at HTMLInputElement.onclick ((index):32)