Kod: Zaznacz cały
function hide(id) {
var a = true;
if (document.getElementById(id).style.display = true && a) {
document.getElementById(id).style.display = "none";
a = false;
}
if (document.getElementById(id).style.display = "none" && a) {
document.getElementById(id).style.display = "true";
a = false;
}
}
...
<span onclick="hide('divek')">Schowaj / pokaż</span>
...
<div id="divek">
To ma się chować i pokazywać
</div>
Bardzo proszę o pomoc
