Hello
I have a div on my page which is set to (display: none) and clicking on the link hides or displays, but I do not understand why my function is not working.
Code:
function esconder(el)
{
var esconder = document.getElementById(el).style.display;
if(esconder == "none")
{
alert("Exibir: " + el);
esconder.style.display = "block";
}
else
{
alert("Esconder: " + el);
esconder.style.display = "none";
}
}
Thank you