I have a menu which is hidden by default and should display after clicking on a button - no problem.
The problem starts when I want to hide the menu again - when I hide it by clicking away on the page, it's ok. However, when I want to hide it by clicking on the yellow button, it hides but after clicking on Normal text it displays again. I don't know the reason but that's certainly something I don't want.
function zobrazSkryVseobecne(idecko) {
var miesto = document.getElementById(idecko);
miesto.className = (miesto.className === "skryt" ? "" : "skryt");
}
Here's my whole code: https://jsfiddle.net/tu958pwg/
Thanks in advance for any advice and sorry for my bad English.