I have a floating div with a 'close' button, which makes the hidden / visible.
<script language="JavaScript">
function controlaLayer(layerover)
{
if( document.getElementById(layerover).style.visibility == "hidden" )
{
document.getElementById(layerover).style.visibility = "visible";
} else {
document.getElementById(layerover).style.visibility = "hidden";
}
}
</script>
<div id="1">
<div id="2">
<div id="3">
<div id="layerover">
<a href="#" onmouseover="controlaLayer('layerover')"><b>X</b></a>
<img></img>
</div>
</div>
</div>
</div>
I would like this div to load only after 2 seconds that the user enters the page. I read a bit about setTimeout but I saw it creates a loop and I just opened the div once.
I am a layman in JS, I am counting on you.